mirror of
https://github.com/dcarrillo/prezto.git
synced 2025-10-24 02:49:07 +00:00
ZSH Docker Aliases
Defines Docker aliases and functions.
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 imagedkiList imagesdkinReturn low-level information on a container, image or taskdkkKill a running containerdklFetch 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)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
container (C)
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 containerdkCinDisplay detailed information on one or more containersdkCkKill one or more running containersdkClFetch 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
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 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
Docker Compose
dkcis short fordocker-composedkcbBuild or rebuild servicesdkcBBuild or rebuild services and do not use cache when building the imagedkcdStop and remove containers, networks, images, and volumesdkceExecute a command in a running containerdkckKill containersdkclView output from containersdkclsis alias fordkcpsdkcpPause servicesdkcPUnpause servicesdkcplPull service imagesdkcphPush service imagesdkcpsList containersdkcrRun a one-off commanddkcRRun a one-off command and remove container after run.dkcrmRemove stopped containersdkcsStart servicesdkcscSet number of containers for a servicedkcSRestart servicesdkcuCreate and start containersdkcUCreate and start containers in detached mode: Run containers in the background, print new container namesdkcVShow the Docker-Compose version informationdkcxStop services
Support
If you're having problems, use the Prezto issue tracker.
Acknowledgements
This module is a copy of akarzim/zsh-docker-aliases by François Vantomme (MIT License).