server/MongoDB/instructions
2021-10-31 14:02:29 +01:00

10 lines
282 B
Plaintext

Launch plain docker file
docker run -d -p 27017:27017 -v ~/dataMongo:/data/db mongo
Create a user (root) and any other databases (with users)
Close and re-run docker file with auth enabled (DBs Should persist)
docker run -d -p 27017:27017 -v ~/dataMongo:/data/db mongo --auth