Interactive session in a Docker container
Published on
Opening a bash session in a given container:
docker exec -it <container-name> /bin/bash
In case the image is more bare bones you can still open a shell session:
docker exec -it <container-name> /bin/sh
If you are not sure about the container names you can list them with:
docker ps --format "{{.Names}}"
This work is licensed under a Creative Commons Attribuition-ShareAlike 4.0 International License .