Skip to content

Instantly share code, notes, and snippets.

@ChrisCrossCrash
Created April 3, 2024 02:18
Show Gist options
  • Save ChrisCrossCrash/687c2e7c973130ea39c96139c132d720 to your computer and use it in GitHub Desktop.
Save ChrisCrossCrash/687c2e7c973130ea39c96139c132d720 to your computer and use it in GitHub Desktop.
Quick MongoDB Docker setup

To quickly start a MongoDB container, run:

docker run --rm -d -p 27017:27017 --name my-mongo mongo

If you want to open a shell in the MongoDB container run:

docker exec -it my-mongo mongosh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment