December 2018
Beginner
826 pages
22h 54m
English
Secondly, we used the following command to list our new container:
$ sudo docker ps
This showed the CONTAINER ID, IMAGE, COMMAND, CREATED, STATUS, PORTS, and NAMES of all our containers (or, in this case, just one).
The CONTAINER ID portion is a random string allocation, and the NAMES section features the randomly generated friendly names of your containers (though this can also be defined at creation time).
When we latterly added -a to our listing command, it was to show that the container wasn't omitted from the initial list simply because it was stopped, as the -a flag will show all containers, not just running ones.