DEV Community

Moh Achun Armando
Moh Achun Armando

Posted on

2 2

Run MongoDB with docker

Run the container of mongo image with name mongodb

docker run -d --name mongodb mongo

Execute shell of the container

docker exec -it mongodb sh

inside the container, just type

mongo

Top comments (2)

Collapse
 
atomzwieback profile image
Atomzwieback

Ok and why we need this exactly? A quality post looks other. Its less info than the text on the docker hub for the official image...

Collapse
 
atjhoendz profile image
Moh Achun Armando

thanks for the response sir, i just want to share about my experience how to use it also as a reminder for me and i purposely wrote it like that to show the commands only without too much explanations. This is my first post, thank you for the feedback next time i will improve it.

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more