Forrest logo
back to the docker tool

docker:tldr:af079

docker: Show the latest created container (includes all states).
$ docker ps --latest
try on your machine

The command docker ps --latest is used to display the latest created or running containers in the Docker environment.

Here is a breakdown of the individual components of the command:

  • docker: This refers to the Docker command-line interface (CLI), which is used for interacting with Docker.
  • ps: This is a subcommand of the Docker CLI that stands for "process status." It is used to list the running containers in the Docker environment.
  • --latest: This is an option or flag to the docker ps command. It instructs Docker to sort the listed containers by creation timestamp in descending order and display only the latest created or running containers.

By running docker ps --latest, you will see a list of the most recently created or running containers, along with their information such as container ID, image used, command executed, and status.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the docker tool