Go template

A small text pattern such as {{.State.Status}} that tells a docker command which fields to print.

In more detail

Many commands take --format (often shortened to -f) to pick fields from their JSON output; {{json .Config}} prints a section as JSON. --filter, by contrast, chooses which items to list. The syntax comes from the Go programming language standard library.

Example

docker ps --format '{{.Names}} {{.Status}}'

Related terms

Taught in

References