Refreshing Docker commands

We've looked at some of the important Docker commands:

  • docker build: Builds an image
  • docker run: Runs an image
  • docker exec: Executes a command in a running container
  • docker ps: Shows the currently running containers
  • docker images: Displays the existing images

While these are the basic ones, knowing most of the available Docker commands is very useful for debugging problems and to perform operations such as monitoring, copying and tagging images, creating networks, and so on. These commands will also show you a lot about how Docker works internally.

An important command: be sure to clean up old containers and images with  docker system prune from time to time. Docker is quite space-intensive after working with it for a few weeks.

The Docker documentation (https://docs.docker.com/v17.12/engine/reference/commandline/docker/) is quite complete. Be sure to know your way around it.