There can be scenarios in which you may have to run/execute commands using a container to get something done.
docker run <your container> /bin/bash -c "command1; command2"
arun@mymachine:~ sudo docker run singharunk/dev /bin/bash -c "date; whoami"
Sun Apr 25 19:58:50 UTC 2021
root
Top comments (1)
Imagine using Docker without having even this most basic understanding of the Linux commandline that you need this - it's a recipe for disaster.