Defines Docker aliases and functions.
With zplug
zplug "akarzim/zsh-docker-aliases"With Oh My Zsh:
git clone https://github.com/akarzim/zsh-docker-aliases.git ~/.oh-my-zsh/custom/plugins/zsh-docker-aliases
# then add `zsh-docker-aliases` to `plugins` in your .zshrcWith zinit
zinit light akarzim/zsh-docker-aliasesdkis short fordockerdkaAttach to a running containerdka!Attach to a running container by namedkbBuild 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 containerdkE!Run an interactive command in a running container by namedkhShow the history of an imagedkiList imagesdkinReturn low-level information on a container, image or taskdkkKill 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 registrydkplIPull all tagged imagesdkphPush an image or a repository to a registrydkpsList containersdkps!Display the first matching docker container ID by namedkpsaList all containers (default lists just running)dkrRun 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 one or more containersdkrmiRemove one or more imagesdkrmCClean up exited containersdkrmIClean up dangling imagesdkrmVClean up unused volumes ( Docker >= 1.9 )dkrnRename 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 volumesdkvShow the Docker version informationdkwBlock until a container stops, then print its exit codedkxStop a running container
dkCManage containersdkCaAttach to a running containerdkCcpCopy files/folders between a container and the local filesystemdkCdInspect changes on a container's filesystemdkCeRun a command in a running containerdkCERun 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 a 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/bashdkCsStart 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
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
dkVManage volumesdkVinDisplay detailed information on one or more volumesdkVlsList volumesdkVprRemove all unused volumesdkVrmRemove one or more volumes
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
dkYManage DockerdkYdfShow docker filesystem usagedkYprRemove unused data
dkKManage Docker stacksdkKlsList stacksdkKpsList the tasks in the stackdkKrmRemove the stack
dkWManage Docker Swarm
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 alias fordkmlsdkmrgRegenerate 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
Note from docker-compose v1.29.2: Except for the Linux platform, Docker Compose is now in the Docker CLI.
dkcis short fordocker-composedkcbBuild or rebuild servicesdkcBBuild or rebuild services and do not use cache when building the imagedkccpCopy files/folders between a service container and the local filesystemdkccrCreates containers for a servicedkccvConverts the compose file to platform's canonical formatdkcdStop and remove containers, networks, images, and volumesdkceExecute a command in a running containerdkcevReceive real time events from containersdkciList images used by the created containersdkckKill containersdkclView output from containersdkcLView and follow (-f) output from containersdkclsList running compose projects (or alias todkcpsunder Linux)dkcpPause servicesdkcPUnpause servicesdkcplPull service imagesdkcphPush service imagesdkcpoPrint the public port for a port bindingdkcpsList containersdkcrRun a one-off commanddkcRRun a one-off command and remove container after run.dkcrmRemove stopped containersdkcsStart servicesdkcscSet number of containers for a servicedkcSRestart servicesdkctDisplay the running processesdkcuCreate and start containersdkcUCreate and start containers in detached mode: Run containers in the background, print new container namesdkcvShow the Docker-Compose version informationdkcxStop services
The author of this module should be contacted via the issue tracker.