ZSH Docker Aliases
June 21, 2026 · View on GitHub
Defines Docker aliases and functions.
How to Install
Install for Zinit
~/.zshrc
source "$HOME/.zinit/bin/zinit.zsh"
zinit ice lucid nocompile wait'0e' nocompletions
zinit load MenkeTechnologies/zsh-docker-aliases
Install for Oh My Zsh
cd "$HOME/.oh-my-zsh/custom/plugins" && git clone https://github.com/MenkeTechnologies/zsh-docker-aliases.git
Aliases
Docker
dkis short fordockerdkaAttach to a running containerdkbBuild an image from a DockerfiledkdInspect changes on a container's filesystemdkdfShow docker filesystem usagedkeRun a command in a running containerdkERun an interactive command in a running containerdkhShow the history of an imagedkisList imagesdkinReturn low-level information on a container, image or taskdkimImport the contents from a tarball to create a filesystem imagedkkKill a running containerdkkhSendkill -s HUPsignal to a running containerdklFetch the logs of a containerdkLFetch and follow (-f) the logs of a containerdkliLog in to a Docker registrydkloLog out from a Docker registrydklsis alias fordkpsdkpPause all processes within one or more containersdkPUnpause all processes within one or more containersdkplPull an image or a repository from a registrydkphPush an image or a repository to a registrydkpsList containersdkpsaList all containers (default lists just running)dkpsvList containers in a vertical key/value formatdkrRun a command in a new containerdkRRun an interactive command in a new container and automatically remove the container when it exitsdkRelikedkRand set entry point to/bin/bashdkRMRemove unused data (docker system prune)dkrmRemove one or more containersdkrmiClean up dangling imagesdkrmcClean up exited containersdkrmvClean up dangling volumesdkrnRename a containerdksStart one or more stopped containersdkSRestart a containerdkssDisplay a live stream of container(s) resource usage statisticsdksvSave one or more images to a tar archive (streamed to STDOUT by default)dktTag an image into a repositorydktopDisplay the running processes of a containerdkupUpdate configuration of one or more containersdkvManage Docker volumesdkvsShow the Docker version informationdkpliPull all tagged imagesdkwBlock until a container stops, then print its exit codedkxStop a running container
container (c)
dkcManage containersdkcaAttach to a running containerdkccpCopy files/folders between a container and the local filesystemdkcdInspect changes on a container's filesystemdkceRun an interactive command in a running containerdkcinDisplay detailed information on one or more containersdkckKill one or more running containersdkclFetch the logs of a containerdkcLFetch and follow (-f) the logs of a containerdkclsList containersdkcpPause all processes within one or more containersdkcprRemove all stopped containersdkcrnRename a containerdkcSRestart one or more containersdkcrmRemove one or more containersdkcrRun an interactive command in a new containerdkcRRun an interactive command in a new container and automatically remove the container when it exitsdkcrelikedkcRand set entry point to/bin/bashdkcrdRun a command in a new detached containerdkcsStart one or more stopped containersdkcssDisplay a live stream of container(s) resource usage statisticsdkcxStop one or more running containersdkctopDisplay the running processes of a containerdkcPUnpause all processes within one or more containersdkcupUpdate configuration of one or more containersdkcwBlock until one or more containers stop, then print their exit codes
image (I)
dkiManage imagesdkibBuild an image from a DockerfiledkihShow the history of an imagedkiimImport the contents from a tarball to create a filesystem imagedkiinDisplay detailed information on one or more imagesdkilsList imagesdkiprRemove unused imagesdkiplPull an image or a repository from a registrydkiphPush an image or a repository to a registrydkirmRemove one or more imagesdkisvSave one or more images to a tar archive (streamed to STDOUT by default)dkitTag an image into a repository
volume (V)
dkvManage volumesdkvinDisplay detailed information on one or more volumesdkvlsList volumesdkvprRemove all unused volumesdkvrmRemove one or more volumes
network (N)
dknManage networksdknsConnect a container to a networkdknxDisconnects a container from a networkdkninDisplays detailed information on a networkdknlsLists all the networks created by the userdknprRemove all unused networksdknrmDeletes one or more networks
system (Y)
dkyManage DockerdkydfShow docker filesystem usagedkyprRemove unused data
stack (K)
dkkManage Docker stacksdkklsList stacksdkkpsList the tasks in the stackdkKrmRemove the stack
swarm (W)
dkwManage Docker Swarm
Docker Machine
dkmis short fordocker-machinedkmaGet or set the active machinedkmcpCopy files between machinesdkmdSet up the default machine ; alowing you to usedkmewithout argumentsdkmeSet up the environment for the Docker client (eg:dkme stagingto toggle to staging)dkminInspect information about a machinedkmipGet the IP address of a machinedkmkKill a machinedkmlsList machinesdkmprRe-provision existing machinesdkmpsis short fordocker-machine psdkmrgRegenerate TLS Certificates for a machinedkmrmRemove a machinedkmsStart a machinedkmshLog into or run a command on a machine with SSHdkmstGet the status of a machinedkmSRestart a machinedkmuGet the URL of a machinedkmupUpgrade a machine to the latest version of DockerdkmvShow the Docker Machine version or a machine docker versiondkmxStop a machine
Docker Compose
dcois short fordocker-composedcbBuild or rebuild servicesdcBBuild or rebuild services and do not use cache when building the imagedcdStop and remove containers, networks, images, and volumesdceExecute a command in a running containerdckKill containersdcloView output from containersdcLView and follow (-f) output from containersdclsis alias fordcpsdcpPause servicesdcPUnpause servicesdcplPull service imagesdcphPush service imagesdcpsList containersdcrRun a one-off commanddcRRun a one-off command and remove container after run.dcrmRemove stopped containersdcsStart servicesdcscSet number of containers for a servicedcSRestart servicesdcUCreate and start containersdcuCreate and start containers in detached mode (run containers in the background)dcvShow the Docker-Compose version informationdcxStop services
Author
The author of this module should be contacted via the issue tracker.