Created
September 2, 2018 18:46
-
-
Save tanftw/7d051ab54bfbcd91c90103d6a65e4fc3 to your computer and use it in GitHub Desktop.
Run Docker MongoDB on Windows
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Create a volume to persist the Mongo database: | |
```sh | |
docker volume create --name=mongodata | |
``` | |
The run a MongoDB instance: | |
```sh | |
docker run -d -p 27017:27017 -v mongodata:/data/db mongo | |
``` | |
Source: https://insomniacgeek.com/2018/03/25/run-mongodb-in-a-docker-container-on-docker-for-windows/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment