mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-03-20 03:13:33 +01:00
Merge 80e37e1207 into 9eaf51107f
This commit is contained in:
commit
590fb742bd
2 changed files with 34 additions and 1 deletions
|
|
@ -271,20 +271,23 @@ _1st_arguments=(
|
||||||
"build":"Build a container from a Dockerfile"
|
"build":"Build a container from a Dockerfile"
|
||||||
"commit":"Create a new image from a container's changes"
|
"commit":"Create a new image from a container's changes"
|
||||||
"cp":"Copy files/folders from the containers filesystem to the host path"
|
"cp":"Copy files/folders from the containers filesystem to the host path"
|
||||||
|
"create":"Create a new container"
|
||||||
"diff":"Inspect changes on a container's filesystem"
|
"diff":"Inspect changes on a container's filesystem"
|
||||||
"events":"Get real time events from the server"
|
"events":"Get real time events from the server"
|
||||||
|
"exec":"Run a command in an existing container"
|
||||||
"export":"Stream the contents of a container as a tar archive"
|
"export":"Stream the contents of a container as a tar archive"
|
||||||
"history":"Show the history of an image"
|
"history":"Show the history of an image"
|
||||||
"images":"List images"
|
"images":"List images"
|
||||||
"import":"Create a new filesystem image from the contents of a tarball"
|
"import":"Create a new filesystem image from the contents of a tarball"
|
||||||
"info":"Display system-wide information"
|
"info":"Display system-wide information"
|
||||||
"insert":"Insert a file in an image"
|
|
||||||
"inspect":"Return low-level information on a container"
|
"inspect":"Return low-level information on a container"
|
||||||
"kill":"Kill a running container"
|
"kill":"Kill a running container"
|
||||||
"load":"Load an image from a tar archive"
|
"load":"Load an image from a tar archive"
|
||||||
"login":"Register or Login to the docker registry server"
|
"login":"Register or Login to the docker registry server"
|
||||||
|
"logout":"Log out from a Docker registry server"
|
||||||
"logs":"Fetch the logs of a container"
|
"logs":"Fetch the logs of a container"
|
||||||
"port":"Lookup the public-facing port which is NAT-ed to PRIVATE_PORT"
|
"port":"Lookup the public-facing port which is NAT-ed to PRIVATE_PORT"
|
||||||
|
"pause":"Pause all processes within a container"
|
||||||
"ps":"List containers"
|
"ps":"List containers"
|
||||||
"pull":"Pull an image or a repository from the docker registry server"
|
"pull":"Pull an image or a repository from the docker registry server"
|
||||||
"push":"Push an image or a repository to the docker registry server"
|
"push":"Push an image or a repository to the docker registry server"
|
||||||
|
|
@ -299,6 +302,7 @@ _1st_arguments=(
|
||||||
"stop":"Stop a running container"
|
"stop":"Stop a running container"
|
||||||
"tag":"Tag an image into a repository"
|
"tag":"Tag an image into a repository"
|
||||||
"top":"Lookup the running processes of a container"
|
"top":"Lookup the running processes of a container"
|
||||||
|
"unpause":"Unpause a paused container"
|
||||||
"version":"Show the docker version information"
|
"version":"Show the docker version information"
|
||||||
"wait":"Block until a container stops, then print its exit code"
|
"wait":"Block until a container stops, then print its exit code"
|
||||||
"exec":"Run a task inside a running container"
|
"exec":"Run a task inside a running container"
|
||||||
|
|
|
||||||
29
plugins/docker/docker.plugin.zsh
Normal file
29
plugins/docker/docker.plugin.zsh
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
# Show only the latest created container ID
|
||||||
|
alias dl="docker ps -l -q"
|
||||||
|
|
||||||
|
# Show all containers
|
||||||
|
alias ds="docker ps -a"
|
||||||
|
|
||||||
|
# List images
|
||||||
|
alias dim="docker images"
|
||||||
|
|
||||||
|
# Check IP Address of specific container
|
||||||
|
alias dip="docker inspect --format=\"{{ .NetworkSettings.IPAddress }}\""
|
||||||
|
|
||||||
|
# Remove all containers.
|
||||||
|
drm() { docker rm $(docker ps -q -a); }
|
||||||
|
|
||||||
|
# Stop all containers
|
||||||
|
dst() { docker stop $(docker ps -q -a); }
|
||||||
|
|
||||||
|
# Kill all running containers.
|
||||||
|
alias dockerkillall='docker kill $(docker ps -q)'
|
||||||
|
|
||||||
|
# Delete all stopped containers.
|
||||||
|
alias dockercleanc='printf "\n>>> Deleting stopped containers\n\n" && docker rm $(docker ps -a -q)'
|
||||||
|
|
||||||
|
# Delete all untagged images.
|
||||||
|
alias dockercleani='printf "\n>>> Deleting untagged images\n\n" && docker rmi $(docker images -q -f dangling=true)'
|
||||||
|
|
||||||
|
# Delete all stopped containers and untagged images.
|
||||||
|
alias dockerclean='dockercleanc || true && dockercleani'
|
||||||
Loading…
Add table
Add a link
Reference in a new issue