Running in Docker Desktop doesn't persist data at /data
- Dominant language
- TypeScript
- Stars
- 2.3k
- Forks
- 393
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 36
Description
### Which service(blob, file, queue, table) does this issue concern?
blob, files, queue, table
### Which version of the Azurite was used?
3.21.0
### Where do you get Azurite? (npm, DockerHub, NuGet, Visual Studio Code Extension)
DockerHub
### What's the Node.js version?
14.17
### What problem was encountered?
When mounting a volume to persist blobs across container restarts they blobs and not persisted.
### Steps to reproduce the issue?
1. Start a docker container with Azurite on the latest build and mount a volume to /data (as per the docs)
2. Upload a blob
3. Restart the container
4. Observe that the blob is no longer there
### Have you found a mitigation/solution?
Yes, to fix this you need to map `/opt/azurite/` and use the `-l ` option on start up. This is because the app is storing the data in the home directory of the app rather than in '/data'. An example of a working docker compose file is given for completeness
```
version: '3.1'
services:
azurite:
image: mcr.microsoft.com/azure-storage/azurite
container_name: azurite
restart: always
entrypoint: ["azurite", "--blobHost", "0.0.0.0", "--blobPort", "10000","-l", "data"]
environment:
AZURITE_ACCOUNTS: "dev:MTIzNDU2Nzg5"
volumes:
- "C:/temp/azureite:/opt/azurite/data"
ports:
- 10000:10000
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.