Skip to content

Instantly share code, notes, and snippets.

@tanftw
Created September 2, 2018 18:46
Show Gist options
  • Save tanftw/7d051ab54bfbcd91c90103d6a65e4fc3 to your computer and use it in GitHub Desktop.
Save tanftw/7d051ab54bfbcd91c90103d6a65e4fc3 to your computer and use it in GitHub Desktop.
Run Docker MongoDB on Windows
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