docker start mongodb in background and run command after code example
Example 1: docker run command on container
sudo docker exec -it <container name> <command>
Example 2: docker exc into mongo shell
docker exec -it container_name mongo
Example 3: docker how to run existing container
docker start <container-name/ID>