Sunday 13 August 2017

Docker recipes

This post is a quick aide-mémoire for basic command-line Docker operations. It’s well worth reading the Docker documentation for the real deal. I’ve been running Docker on Windows 10 Home – yes, Home – so I’ve had to use Docker Toolbox. I’ve run the commands listed here using the Docker Quickstart Terminal that comes with the Toolbox.

List containers

To list the all containers run the following command:

docker container ls


See the docker container ls documentation.

Run a Bash shell on a container

To get access to a container using a Bash shell run the following command:

docker exec –it <container-name-here> bash