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 You can only open sessions in containers that are running so check their status with docker ps before trying to open the session. 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 This is not recommended on internet facing servers, keep docker privileges to the root user.