Docker 01 - Docker version, info and management commands

This post will cover the basic commands to check the Docker version and information, as well as the management commands.

Docker Version and Information

  • docker version

    This is used to check the versions of docker components. The reason they are referred to as components is that Docker consists of various elements, not just the docker engine, but also the docker client, docker daemon, docker runc, and others.

  • docker info This command displays comprehensive information about the currently running Docker environment, including the number of containers, images, volumes, networks, and other details.

Docker Management Commands

Since Docker 1.13, management commands have been introduced to organize Docker commands more effectively.

Enter docker in the CLI to see the available commands:

Usage:  docker [OPTIONS] COMMAND

A self-sufficient runtime for containers

Common Commands:
  run         Create and run a new container from an image
  exec        Execute a command in a running container
  ps          List containers
  build       Build an image from a Dockerfile
  pull        Download an image from a registry
  push        Upload an image to a registry
  images      List images
  login       Log in to a registry
  logout      Log out from a registry
  search      Search Docker Hub for images
  version     Show the Docker version information
  info        Display system-wide information

Management Commands:
  builder     Manage builds
  buildx*     Docker Buildx (Docker Inc., v0.12.0-desktop.2)
  compose*    Docker Compose (Docker Inc., v2.23.3-desktop.2)
  container   Manage containers
  context     Manage contexts
  dev*        Docker Dev Environments (Docker Inc., v0.1.0)
  extension*  Manages Docker extensions (Docker Inc., v0.2.21)
  feedback*   Provide feedback, right in your terminal! (Docker Inc., 0.1)
  image       Manage images
  init*       Creates Docker-related starter files for your project (Docker Inc., v0.1.0-beta.10)
  manifest    Manage Docker image manifests and manifest lists
  network     Manage networks
  plugin      Manage plugins
  sbom*       View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc., 0.6.0)
  scan*       Docker Scan (Docker Inc., v0.26.0)
  scout*      Docker Scout (Docker Inc., v1.2.0)
  system      Manage Docker
  trust       Manage trust on Docker images
  volume      Manage volumes

...

As shown above, commands are divided into common commands and management commands.

The structure of a typical command is:

docker <command> (options)

However, Management commands are structured like this:

docker <command> <sub-command> (options)

Management commands organize Docker functionalities hierarchically, creating parent-child command relationships for better coherence and understanding. For example, traditional container management commands like docker run and docker stop become docker container run and docker container stop in the management command structure.




    Enjoy Reading This Article?

    Here are some more articles you might like to read next:

  • Dependency Injection
  • CPU Cache
  • Understanding Linear Blended Skinning in 3D Animation
  • Starvation in Operating Systems
  • Virtual Memory