Forrest logo
back to the docker tool

docker:tldr:923d5

docker: Display real-time events from containers streamed as valid JSON Lines.
$ docker system events --filter 'type=container' --format '${json -}'
try on your machine

The "docker system events" command is used to monitor events happening within the Docker system. This includes events related to containers, images, volumes, networks, and other Docker components.

In this specific command, the following options are used:

  • "--filter 'type=container'": This sets a filter to only show events related to containers. Without this filter, events related to other components would also be displayed.

  • "--format '${json -}'": This sets the output format for the events to JSON. The "${json -}" format specifier indicates that each event should be formatted as a JSON object.

So when you run the command "docker system events --filter 'type=container' --format '${json -}'", it will display the container-related events in JSON format. The events could include information such as container creation, start, stop, deletion, etc.

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