Updated instructions
This commit is contained in:
commit
206ee7c5c3
@ -1,4 +1,4 @@
|
|||||||
Launch plain docker file
|
Launch plain dockerfile
|
||||||
|
|
||||||
docker run -d -p 27017:27017 -v ~/dataMongo:/data/db mongo
|
docker run -d -p 27017:27017 -v ~/dataMongo:/data/db mongo
|
||||||
|
|
||||||
@ -6,4 +6,9 @@ Create a user (root) and any other databases (with users)
|
|||||||
|
|
||||||
Close and re-run docker file with auth enabled (DBs Should persist)
|
Close and re-run docker file with auth enabled (DBs Should persist)
|
||||||
|
|
||||||
docker run -d -p 27017:27017 -v ~/dataMongo:/data/db --restart unless-stopped mongo --auth
|
docker run -d -p 27017:27017 -v ~/dataMongo:/data/db mongo --auth
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
https://stackoverflow.com/questions/42201233/mongodb-with-docker-authentication
|
||||||
|
Loading…
Reference in New Issue
Block a user