Docker container ID is important to start, stop, and remove Docker containers from the command line.
To find the IDs of all the running and stopped Docker containers, run the following command:
$ docker ps -qa
To find the IDs of all the running Docker containers, run the following command:
$ docker ps -q
To find the IDs of all the stopped Docker containers, run the following command:
$ docker ps -qf 'status=exited'