Step 1: Install Docker on your local machine

See the fantastic set of instructions here.

Step 2: Set up a MongoDB Docker container

Pull down the pre-built mongo image from the Docker repository:

docker pull mongo

Start a Docker container:

docker run

Check that the container’s up and running:

docker container ls

(you should see your container listed)

Step 3: Connect to the container and access your MongoDB instance

Start + connect to a bash shell within the container:

docker exec -it YOUR_CONTAINER_NAME_HERE bash

Access the MongoDB instance via the…

Tom Szpytman

Full-stack + Product. Available for hire either as an independent contractor, or as part of a team. Inquiries: mail [at]

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store