From 38bab29776950ac2364ed64195b89887717c33de Mon Sep 17 00:00:00 2001 From: Azat Bahawi Date: Thu, 1 Jan 1970 03:00:00 +0300 Subject: chore: init --- profile/.profile.d/docker.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 profile/.profile.d/docker.sh (limited to 'profile/.profile.d/docker.sh') diff --git a/profile/.profile.d/docker.sh b/profile/.profile.d/docker.sh new file mode 100644 index 0000000..b034b51 --- /dev/null +++ b/profile/.profile.d/docker.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +if command -v docker >/dev/null 2>&1; then + alias dk="docker" + alias dk-ip="docker inspect --format '{{ .NetworkSettings.IPAddress }}'" + alias dk-pid="docker inspect --format '{{ .State.Pid }}'" + alias dk-rm-all="docker rm \$(docker ps --quiet --all)" + alias dk-rm-exited="docker rm \$(docker ps --quiet --format 'status=exited')" + alias dk-rmi-all="docker rmi \$(docker images --quiet --all)" + alias dk-rmi-dangling="docker rmi \$(docker images --quiet --format 'dangling=true')" + alias dk-stop-all="docker stop \$(docker ps --quiet --format 'status=running')" +fi -- cgit 1.4.1