{"id":20416458,"url":"https://github.com/redxtech/zsh-containers","last_synced_at":"2025-04-12T17:06:49.124Z","repository":{"id":184505142,"uuid":"672007929","full_name":"redxtech/zsh-containers","owner":"redxtech","description":"ZSH plugin to handle podman and docker aliases","archived":false,"fork":false,"pushed_at":"2024-01-04T01:42:53.000Z","size":13,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-26T11:21:39.598Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/redxtech.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-07-28T17:10:59.000Z","updated_at":"2025-03-17T00:09:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"f4cd36f8-733a-4d21-a3dc-0ff3cb171096","html_url":"https://github.com/redxtech/zsh-containers","commit_stats":null,"previous_names":["redxtech/zsh-containers"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redxtech%2Fzsh-containers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redxtech%2Fzsh-containers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redxtech%2Fzsh-containers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redxtech%2Fzsh-containers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/redxtech","download_url":"https://codeload.github.com/redxtech/zsh-containers/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248602306,"owners_count":21131615,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-15T06:20:05.181Z","updated_at":"2025-04-12T17:06:49.098Z","avatar_url":"https://github.com/redxtech.png","language":"Shell","funding_links":[],"categories":["Plugins"],"sub_categories":["ZSH on Windows"],"readme":"# zsh-containers\n\n\u003e zsh-containers is a zsh plugin that provides aliases and better interoperability between podman and docker commands based on which you have installed.\n\n## installing\n\n### zinit\n\nAdd this to your zinit config (.zshrc):\n\n```zsh\nzinit light redxtech/zsh-containers\n\n# it also works with turbo mode:\nzinit ice wait lucid\nzinit load redxtech/zsh-containers\n```\n\n### oh-my-zsh\n\nInstall it with your favourite zsh package manager, or clone it directly to your `$ZSH_CUSTOM/plugins` directory with git, and add `containers` to the plugins array in your `.zshrc` file:\n\n```zsh\nplugins=(... containers)\n```\n\n## completion\n\ni would recommend using [greymd/docker-zsh-completion](https://github.com/greymd/docker-zsh-completion) for up-to-date completions pulled weekly from upstream.\n\n## podman -\u003e docker\n\nsince `podman` and `docker` commands are mostly interchangable, people will often use `alias docker=\"podman\"`, and it usually works fine - however, if you also use `docker compose`, it might be not work if you run compose via `docker compose`, since `podman compose` isn't a command - you have to run `podman-compose`, which isn't exactly compatible with the alias method.\n\nto solve that, i've made a `docker` function, that detects if the first argument is `compose`. if that's the case, it removes that argument, and passes the rest to `podman-compose`. for any other first argument, it passes them all to podman.\n\nif you don't use podman or podman-compose, then this plugin won't change any of this.\n\n# `docker` aliases\n\n| Alias   | Command                       | Description                                                                              |\n| :------ | :---------------------------- | :--------------------------------------------------------------------------------------- |\n| dbl     | `docker build`                | Build an image from a Dockerfile                                                         |\n| dcin    | `docker container inspect`    | Display detailed information on one or more containers                                   |\n| dcls    | `docker container ls`         | List all the running docker containers                                                   |\n| dclsa   | `docker container ls -a`      | List all running and stopped containers                                                  |\n| dib     | `docker image build`          | Build an image from a Dockerfile (same as docker build)                                  |\n| dii     | `docker image inspect`        | Display detailed information on one or more images                                       |\n| dils    | `docker image ls`             | List docker images                                                                       |\n| dipu    | `docker image push`           | Push an image or repository to a remote registry                                         |\n| dirm    | `docker image rm`             | Remove one or more images                                                                |\n| dit     | `docker image tag`            | Add a name and tag to a particular image                                                 |\n| dlo     | `docker container logs`       | Fetch the logs of a docker container                                                     |\n| dnc     | `docker network create`       | Create a new network                                                                     |\n| dncn    | `docker network connect`      | Connect a container to a network                                                         |\n| dndcn   | `docker network disconnect`   | Disconnect a container from a network                                                    |\n| dni     | `docker network inspect`      | Return information about one or more networks                                            |\n| dnls    | `docker network ls`           | List all networks the engine daemon knows about, including those spanning multiple hosts |\n| dnrm    | `docker network rm`           | Remove one or more networks                                                              |\n| dpo     | `docker container port`       | List port mappings or a specific mapping for the container                               |\n| dpu     | `docker pull`                 | Pull an image or a repository from a registry                                            |\n| dr      | `docker container run`        | Create a new container and start it using the specified command                          |\n| drit    | `docker container run -it`    | Create a new container and start it in an interactive shell                              |\n| drm     | `docker container rm`         | Remove the specified container(s)                                                        |\n| drm!    | `docker container rm -f`      | Force the removal of a running container (uses SIGKILL)                                  |\n| dst     | `docker container start`      | Start one or more stopped containers                                                     |\n| drs     | `docker container restart`    | Restart one or more containers                                                           |\n| dsta    | `docker stop $(docker ps -q)` | Stop all running containers                                                              |\n| dstp    | `docker container stop`       | Stop one or more running containers                                                      |\n| dtop    | `docker top`                  | Display the running processes of a container                                             |\n| dvi     | `docker volume inspect`       | Display detailed information about one or more volumes                                   |\n| dvls    | `docker volume ls`            | List all the volumes known to docker                                                     |\n| dvprune | `docker volume prune`         | Cleanup dangling volumes                                                                 |\n| dxc     | `docker container exec`       | Run a new command in a running container                                                 |\n| dxcit   | `docker container exec -it`   | Run a new command in a running container in an interactive shell                         |\n\n# `docker compose` aliases\n\n| Alias     | Command                        | Description                                                                      |\n| --------- | ------------------------------ | -------------------------------------------------------------------------------- |\n| dco       | `docker-compose`               | Docker-compose main command                                                      |\n| dcb       | `docker-compose build`         | Build containers                                                                 |\n| dce       | `docker-compose exec`          | Execute command inside a container                                               |\n| dcps      | `docker-compose ps`            | List containers                                                                  |\n| dcrestart | `docker-compose restart`       | Restart container                                                                |\n| dcrm      | `docker-compose rm`            | Remove container                                                                 |\n| dcr       | `docker-compose run`           | Run a command in container                                                       |\n| dcstop    | `docker-compose stop`          | Stop a container                                                                 |\n| dcup      | `docker-compose up`            | Build, (re)create, start, and attach to containers for a service                 |\n| dcupb     | `docker-compose up --build`    | Same as `dcup`, but build images before starting containers                      |\n| dcupd     | `docker-compose up -d`         | Same as `dcup`, but starts as daemon                                             |\n| dcupdb    | `docker-compose up -d --build` | Same as `dcup`, but build images before starting containers and starts as daemon |\n| dcdn      | `docker-compose down`          | Stop and remove containers                                                       |\n| dcl       | `docker-compose logs`          | Show logs of container                                                           |\n| dclf      | `docker-compose logs -f`       | Show logs and follow output                                                      |\n| dcpull    | `docker-compose pull`          | Pull image of a service                                                          |\n| dcstart   | `docker-compose start`         | Start a container                                                                |\n| dck       | `docker-compose kill`          | Kills containers                                                                 |\n\n## credit\n\nthanks to the [docker](https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/docker) and [docker-compose](https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/docker-compose) `oh-my-zsh` plugins for inspiration for the aliases.\n\n## author\n\n**zsh-containers** © [gabe dunn](https://github.com/redxtech), released under the [MIT](./LICENSE) License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredxtech%2Fzsh-containers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fredxtech%2Fzsh-containers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredxtech%2Fzsh-containers/lists"}