Mongo/Docker Setup
Chris Sexton
2022-03-28
Mongo/Docker Setup
- Set up docker for your operating system if it's not already set up: https://www.docker.com
- Download and put in a known directory:
- Open a terminal and change directory to your known directory
- With Docker Desktop running, run
docker compose up
- From any mongo client (like DataGrip), connect to:
- host:
127.0.0.1
- port:
27017
- user:
root
- pass:
example
- host:
- You will likely want to flip to the 'Schemas' tab in the connection settings and select "All databases"
- You should have a
students
database and collection automatically
- You should have a
- When finished, use
docker compose down
to destroy the instance
You can use ^c
to end the process, or run docker compose up -d
to run it in the background.