Skip to content

Instantly share code, notes, and snippets.

@diyan
Last active November 8, 2015 10:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save diyan/a9f230884cc25dd0234a to your computer and use it in GitHub Desktop.
Save diyan/a9f230884cc25dd0234a to your computer and use it in GitHub Desktop.
Fix. Default output from 'docker ps' command is too wide

Fix. Default output from 'docker ps' command is too wide

$ docker ps -a
CONTAINER ID        IMAGE                    COMMAND                CREATED             STATUS                     PORTS               NAMES
e33e91281698        choam_nagios4            "/usr/bin/supervisor   12 days ago         Exited (0) 12 days ago                         choam_nagios4
8283b1a88e02        google/cadvisor:latest   "/usr/bin/cadvisor"    13 days ago         Exited (0) 12 days ago                         cadvisor
4eee19c7e065        postgres:9.4             "/docker-entrypoint.   3 weeks ago         Exited (0) 3 weeks ago                         choam_sentrydb_1
b5f5231a595a        redis:3.0                "/entrypoint.sh redi   3 weeks ago         Exited (0) 3 weeks ago                         choam_sentrycache_1
413c30531762        acme_backend             "npm start"            5 weeks ago         Exited (137) 5 weeks ago                       acme_backend_1
cb6f658ed974        slafs/sentry:7.4         "/usr/local/bin/sent   5 weeks ago         Exited (0) 5 weeks ago                         acme_sentry_1
8d3cb07ca2e8        slafs/sentry:7.4         "/usr/local/bin/sent   5 weeks ago         Exited (0) 5 weeks ago                         acme_sentryworker_1
a25c2d8ff585        postgres:9.4             "/docker-entrypoint.   5 weeks ago         Exited (0) 5 weeks ago                         acme_sentrydb_1
00ef6282439b        redis:3.0                "/entrypoint.sh redi   5 weeks ago         Exited (0) 2 weeks ago                         acme_sentrycache_1
$ docker ps -a | sed 's:CONTAINER ID *::;s:^[0-9a-f]* *::;s:CREATED *::;s:[0-9]* [a-z]* ago *::'
IMAGE                    COMMAND                STATUS                     PORTS               NAMES
choam_nagios4            "/usr/bin/supervisor   Exited (0) 12 days ago                         choam_nagios4
google/cadvisor:latest   "/usr/bin/cadvisor"    Exited (0) 12 days ago                         cadvisor
postgres:9.4             "/docker-entrypoint.   Exited (0) 3 weeks ago                         choam_sentrydb_1
redis:3.0                "/entrypoint.sh redi   Exited (0) 3 weeks ago                         choam_sentrycache_1
acme_backend             "npm start"            Exited (137) 5 weeks ago                       acme_backend_1
slafs/sentry:7.4         "/usr/local/bin/sent   Exited (0) 5 weeks ago                         acme_sentry_1
slafs/sentry:7.4         "/usr/local/bin/sent   Exited (0) 5 weeks ago                         acme_sentryworker_1
postgres:9.4             "/docker-entrypoint.   Exited (0) 5 weeks ago                         acme_sentrydb_1
redis:3.0                "/entrypoint.sh redi   Exited (0) 2 weeks ago                         acme_sentrycache_1    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment