Created
December 20, 2017 16:53
-
-
Save azylinski/393d5fd335ca570ac88d1957f2622ad0 to your computer and use it in GitHub Desktop.
Overwrite default "docker ps" 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 | |
# Example: docker ps --format 'table {{.Names}}\t{{.Image}}\t{{.Command}}\t{{.Status}}' | |
# | |
# Overwrite default "docker ps" format (do not show Container ID and Created At columns) | |
# Read more: https://container42.com/2016/03/27/docker-quicktip-7-psformat/ | |
jq '. + {"psFormat": "table {{.Names}}\t{{.Image}}\t{{.Command}}\t{{.Status}}"}' ~/.docker/config.json > /tmp/docker_config.json && mv /tmp/docker_config.json ~/.docker/config.json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment