Docker Command Overview

The problem with Docker 1.12 CLI is that the Docker CLI has about approx 40 top-level commands. But these commands had a few issues. The commands are listed in one list without any organization. That makes it difficult for newbies to get started and learn the commands as those were not segregated based on images, containers, network, etc. And Moreover, there is no consistency of command names as well.

This issue was resolved in Docker 1.13 and onwards with Docker Management Commands.

Docker 1.13 groups the commands logically into management commands-

checkpoint  Manage checkpoints
container   Manage containers
image       Manage images
network     Manage networks
node        Manage Swarm nodes
plugin      Manage plugins
secret      Manage Docker secrets
service     Manage services
stack       Manage Docker stacks
swarm       Manage Swarm
system      Manage Docker
volume      Manage volumes

Here a list of images is retrieved using docker image ls command instead of docker images .

Similar, docker container ls shows the list of containers instead of docker ps

This makes them very organized and segregated and also very easy to remember the commands. Each management command has a similar set of sub-commands where they perform the operation on the command category.

Docker Parent and Child commands

Running basic docker commands Let's run and see a few of the basic Docker commands: List down the running containers

$ docker container ls

The list of containers can also be found out using below command:

docker ps

List the images

docker image ls

List the networks

docker network ls