NOTES INDEX This page is part of the collection of "notes" - these can be considered to be micro-blogs.
Running CTOP in Docker

Running CTOP in Docker

CTOP is a nice command line tool to look at running Docker containers. To prevent from having to install the ctop binary locally, and always have the latest version, I do run it inside docker. For easy execution, I created a (Linux) bash alias:

alias ctop='docker run --rm -ti --name=ctop --volume /var/run/docker.sock:/var/run/docker.sock:ro -s cpu'Code language: Bash (bash)

Just add it to your .bashrc (or some other file you load when opening a new shell, like ~/.bash_aliases). From then on, you can just type ctop as command line command, and it will launch the ctop in docker for you.

Example run:

ctop overview
ctop details (a data-conversion running in postgresql on 613584246 records)

December 19, 2021

Leave a Reply

Your email address will not be published. Required fields are marked *