mongo shell exits when container is running code example Example: docker exc into mongo shell docker exec -it container_name mongo