Skip to content

Latest commit

 

History

History
16 lines (10 loc) · 507 Bytes

docker-mongo-create.md

File metadata and controls

16 lines (10 loc) · 507 Bytes

Create and run mongo

docker run -p {{PORT}}:{{PORT}} --name {{CONTAINER_NAME}} -d mongo:{{TAG}}

  • PORT: Port on which mongo will be running/accesed
  • CONTAINER_NAME: Name to assign to the container
  • TAG: Tag of the mongo DB from docker hub

Example:

docker run -p 27017:27017 --name mongo-server -d mongo:3.2

Related