run mongodb from docker code example
Example 1: docker exc into mongo shell
docker exec -it container_name mongo
Example 2: access mongodb running in docker
docker exec -it mongodb bash
mongo
docker exec -it container_name mongo
docker exec -it mongodb bash
mongo