Created
April 9, 2018 12:19
-
-
Save itwars/89906b57b3650a016a6415b364992f2e to your computer and use it in GitHub Desktop.
help on docker --format
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker ps [--format="TEMPLATE"] | |
--format="TEMPLATE" | |
Pretty-print containers using a Go template. | |
Valid placeholders: | |
.ID - Container ID | |
.Image - Image ID | |
.Command - Quoted command | |
.CreatedAt - Time when the container was created. | |
.RunningFor - Elapsed time since the container was started. | |
.Ports - Exposed ports. | |
.Status - Container status. | |
.Size - Container disk size. | |
.Names - Container names. | |
.Labels - All labels assigned to the container. | |
.Label - Value of a specific label for this container. For example {{.Label "com.docker.swarm.cpu"}} | |
.Mounts - Names of the volumes mounted in this container. | |
docker ps --format "{{.ID}}: {{.Command}}" | |
docker ps --format "table {{.ID}}\t{{.Labels}}" | |
docker ps --format 'table {{.ID}}\t{{(.Label "com.docker.swarm.node")}}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment