Docker

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 without root

Published on

Create the docker group.

sudo groupadd docker

Add your user to the docker group.

sudo usermod -aG docker $USER

Apply the changes to the group.

newgrp docker

Verify if you can run docker.

docker version