58
Run bash or any command in a Docker container

Run bash or any command in a Docker container

5 years ago
Anonymous $hM_jrxqbr-

https://hackernoon.com/run-bash-or-any-command-in-a-docker-container-9a1e7f0ec204

Once you’ve defined your images and Dockerfiles, you then may want to enter a container to run bash or other commands. There are a few different ways to do this depending on whether you are using docker or docker-compose.

Assuming you know the name of your container, or if you don’t run docker ps to list the processes running and copy the container name…