From 736dc8194c7d73cde8565118999561a06e79c17d Mon Sep 17 00:00:00 2001 From: ummahrican Date: Sat, 30 Nov 2024 14:17:02 -0800 Subject: [PATCH] add docker plugin context aliases --- plugins/docker/README.md | 6 ++++++ plugins/docker/docker.plugin.zsh | 10 ++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/plugins/docker/README.md b/plugins/docker/README.md index 8619125a2..e2d0af228 100644 --- a/plugins/docker/README.md +++ b/plugins/docker/README.md @@ -47,6 +47,12 @@ zstyle ':omz:plugins:docker' legacy-completion yes | dcin | `docker container inspect` | Display detailed information on one or more containers | | dcls | `docker container ls` | List all the running docker containers | | dclsa | `docker container ls -a` | List all running and stopped containers | +| dctx | `docker context` | Base docker context command to add subcommands at will | +| dctxc | `docker context create` | Create a docker context | +| dctxi | `docker context inspect` | Inspect docker context to retrieve relevant config and metadata | +| dctxls | `docker context ls` | List docker contexts | +| dctxrm | `docker context rm` | Remove one docker context by name | +| dctxu | `docker context use` | Switch current context to specified name | | dib | `docker image build` | Build an image from a Dockerfile (same as docker build) | | dii | `docker image inspect` | Display detailed information on one or more images | | dils | `docker image ls` | List docker images | diff --git a/plugins/docker/docker.plugin.zsh b/plugins/docker/docker.plugin.zsh index 16db77df6..9f1bab043 100644 --- a/plugins/docker/docker.plugin.zsh +++ b/plugins/docker/docker.plugin.zsh @@ -2,11 +2,17 @@ alias dbl='docker build' alias dcin='docker container inspect' alias dcls='docker container ls' alias dclsa='docker container ls -a' +alias dctx='docker context' +alias dctxc='docker context create' +alias dctxi='docker context inspect' +alias dctxls='docker context ls' +alias dctxrm='docker context rm' +alias dctxu='docker context use' alias dib='docker image build' alias dii='docker image inspect' alias dils='docker image ls' -alias dipu='docker image push' alias dipru='docker image prune -a' +alias dipu='docker image push' alias dirm='docker image rm' alias dit='docker image tag' alias dlo='docker container logs' @@ -24,8 +30,8 @@ alias dr='docker container run' alias drit='docker container run -it' alias drm='docker container rm' alias 'drm!'='docker container rm -f' -alias dst='docker container start' alias drs='docker container restart' +alias dst='docker container start' alias dsta='docker stop $(docker ps -q)' alias dstp='docker container stop' alias dtop='docker top'