When starting the image I get the following error:
2019-02-27T17:09:41.095+0000 E STORAGE [initandlisten] WiredTiger error (17) [1551287381:95206][1:0x7fae
Although Augustas is right, but I found this answer particularly useful with docker-compose.yml.
What you can do as a workaround is:
.env file in the same path as your docker-compose file and store the current path in an environment variable like this:MONGO_HOST_DATA=/Users/user123/MyMongoProject //path to mongo data folder (for C:\Users\user123\MyMongoProject)
docker-compose file, replace the above-mentioned variable: services:
my-mongo-db:
build: ./database
ports:
- 32815:27017
volumes:
- ${MONGO_HOST_DATA}/database/db:/data/db
docker-compose config
Additionally, if you use any disk drive other than C:\ you might want to change the Docker file sharing settings:
Hope this helps.