Sei sulla pagina 1di 1

docker container run --name mongo-test-volume -p 27017:27017 -v

/Users/vamipara/Dev/dc-dev/docker-volumes/data:/data/db mongo:latest

References: https://docs.docker.com/samples/library/mongo/#using-a-custom-mongodb-
configuration-file

There are 2 ways:


1) By mounting the host directory and see all the data files in there.
2) By creating first a docker volume and then mount the docker volume so that the
data files are not visible in case there is security issue.

References: https://medium.com/@katopz/mongodb-docker-data-volume-containers-
f6c92eca8288

Potrebbero piacerti anche