Ben Chuanlong Du's Blog

And let it direct your passion with reason.

Using Bash in Docker

If the docker container was started using /bin/bash (you can check using docker ps) command you can access it using attach.

docker attach container_name_or_id

If the docker container was started but not with /bin/bash, you have to create a bash instance inside the container using exec.

docker exec …