Skip to content

Latest commit

 

History

History

18_Formatting_PS_Output

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Formatting PS Output

Using the --format parameter with Golang specific syntax template.

Formatting docker ps command

$ docker run -d redis
$ docker ps
$ docker ps --format '{{.Names}} container is using {{.Image}} image'
$ docker ps --format 'table {{.Names}}\t{{.Image}}'

image

Listing IP Address by formatting Docker Inspect command

$ docker ps -q | xargs docker inspect --format '{{ .Id }} - {{ .Name }} - {{ .NetworkSettings.IPAddress }}'

image

References

KataCoda Experiments