The Dell Linux Engineering team has been evaluating Docker containers and exploring ways for optionally delivering Dell applications via containers. In August 2015 we announced an unsupported test image of OpenManage System Administrator (OMSA) as a way for customers to run OMSA on unsupported Linux distributions such as Ubuntu Server and Debian.
During our evaluation, we noticed that the output of some of Docker’s native CLI tools to list images and containers was a bit hard to read, so we wrote a few wrapper scripts to parse the output and present it in a more readable format. These tools have been uploaded to GitHub and can be found here.
The output of “docker images” (which lists all images in a host) can be hard to read depending on the width of your terminal session, but even for an 80-character wide terminal it can be a bit cumbersome to read:
$ docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
docker.io/ubuntu 12.04 0ac5b09d8536 10 days ago 136 MB
docker.io/redis latest c08dd1f8fad9 2 weeks ago 109.2 MB
docker.io/centos centos6 3bbbf0aca359 2 weeks ago 190.6 MB
docker.io/jdelaros1/openmanage latest 14c9ffaa58cd 6 weeks ago 923.8 MB
docker.io/ubuntu 14.04 91e54dfb1179 10 weeks ago 188.3 MB
Instead, you could have something like this:
| image | tag | id | size |
| docker.io/ubuntu | 12.04 | 0ac5b09d8536 | 136 MB |
| docker.io/redis | latest | c08dd1f8fad9 | 109.2 MB |
| docker.io/centos | centos6 | 3bbbf0aca359 | 190.6 MB |
| docker.io/jdelaros1/openmanage | latest | 14c9ffaa58cd | 923.8 MB |
| docker.io/ubuntu | 14.04 | 91e54dfb1179 | 188.3 MB |
The output of “docker ps –a” (which lists all containers in a host) is even more difficult to read:
$ docker ps –a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
8805dd058de7 httpd-home "/bin/sh -c '/usr/sbi" 3 weeks ago Up 4 days 0.0.0.0:80->80/tcp httpd1
2f6c3cdece74 samba "/usr/sbin/smbd -F" 5 weeks ago Up 15 hours 0.0.0.0:139->139/tcp smb
a36f96134297 httpd-wget "/bin/sh -c '/usr/sbi" 7 weeks ago Up 4 days 0.0.0.0:8088->443/tcp httpd2
7d514765cf40 sshd-put "/usr/sbin/sshd -D" 10 weeks ago Exited (255) 56 seconds ago
Instead, you could have a cleaner output:
| name | state | ip | port |
| httpd1 | running | 172.17.0.3 | 80/tcp -> 80 |
| smb | running | 172.17.0.5 | 139/tcp -> 139 |
| httpd2 | running | 172.17.0.2 | 443/tcp -> 8088 |
| sshd1 | shut off | n/a | n/a |
$ docker-container-list.py -h
Usage: docker-container-list.py [options]
Display container information in a nice readable format.
-h, --help show this help message and exit
We also posted other tools for more easily managing Docker images and containers. Before using them in a live environment, be sure to familiarize yourself with the different command options.
Please note these tools are provided as-is and not supported by Dell. Feel free to clone the git repository and adapt the tools to suit your needs. Or better yet, submit a bug or pull request via GitHub, contributions are welcome.