Post

Run MongoDB in a Docker container on Docker for Windows

Just a note to self on how to run a MongoDB instance using Docker for Windows.

Create a volume to persist the Mongo database:

1
docker volume create --name=mongodata

The run a MongoDB instance:

1
docker run -d -p 27017:27017 -v mongodata:/data/db mongo
This post is licensed under CC BY 4.0 by the author.