We can use the Docker container list or ps command to do so. To display all the running containers, we can use the following command:
$ docker ps
To display all the containers in the machine, we can use the following command:
$ Docker ps -a
or
$ docker container ls -a