docker inspect --format '{{.Name}} {{.Config.Image}}' myapp

Category: Docker

docker inspect --format '{{.Name}} {{.Config.Image}}' myapp

Show a container's name and image

Prints the container's name (with a leading slash) and the image it was created from. The long --format spelling suits documentation; -f is the shorthand. Combine fields with any Go template.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.