There's more...

To list both running and stopped containers, use the -a option as follows:

To return just the container IDs of all containers, use the -aq option as follows:

To show the last created container, including non-running containers, run the following command:

    $ docker container ls -l

Using the --filter/-f option to ps, we can list containers with specific labels. Look at the Labelling and filtering containers recipe in this chapter for more details.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.220.134.75