.bashrc: Add docker-related helper aliases
authorTony Duckles <tony@nynim.org>
Sat, 28 Nov 2020 01:39:03 +0000
committerTony Duckles <tony@nynim.org>
Sat, 28 Nov 2020 01:39:03 +0000
.bashrc

diff --git a/.bashrc b/.bashrc
index 0ecfef99b1d4f358018c4e68b09d3ade65fa0124..2400909d0b95414055d8a2ac110a36ca142eb3f9 100644 (file)
--- a/.bashrc
+++ b/.bashrc
@@ -260,6 +260,13 @@ alias rehash="hash -r"
 # svn-wrapper
 alias svn=svn-wrapper
 
+# docker helpers
+if [ -n "$(type -P docker)" ]; then
+    alias docker-tail="docker logs -tf --tail 50"
+    alias docker-top="docker run --name ctop  -it --rm -v /var/run/docker.sock:/var/run/docker.sock quay.io/vektorlab/ctop"
+    alias ctop="docker-top"
+fi
+
 if [ "$UNAME" = SunOS ]; then
     # Solaris: use GNU versions of coreutils
     test -x /usr/gnu/bin/grep && alias grep="/usr/gnu/bin/grep"