Skip to content

Instantly share code, notes, and snippets.

@mallond
Created December 7, 2016 18:41
Show Gist options
  • Save mallond/cc67f5fe77ea2024708a4ec4c147832e to your computer and use it in GitHub Desktop.
Save mallond/cc67f5fe77ea2024708a4ec4c147832e to your computer and use it in GitHub Desktop.
Mongo and Docker
Run MongoDB and the Mongo Client from Docker
Step 1: Start the mongodb service via docker
$ docker run --name localmongo -p 27017:27017 -d mongo
Step 2: exec into the machine
$ docker exec -it localmongo mongo mongodb://localhost:27017
Other:
Substitute the localhost:27017 string for remote access
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment