fix(README): fix docker aliases documentation

This commit is contained in:
baltic-tea 2024-11-10 16:53:54 +03:00 committed by GitHub
parent 3914197aa2
commit e12ff3d828
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -42,7 +42,7 @@ zstyle ':omz:plugins:docker' legacy-completion yes
## Aliases ## Aliases
| Alias | Command | Description | | Alias | Command | Description |
| :------ | :------------------------------- | :--------------------------------------------------------------------------------------- | | :------- | :---------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------- |
| dbl | `docker build` | Build an image from a Dockerfile | | dbl | `docker build` | Build an image from a Dockerfile |
| dcin | `docker container inspect` | Display detailed information on one or more containers | | dcin | `docker container inspect` | Display detailed information on one or more containers |
| dcls | `docker container ls` | List all the running docker containers | | dcls | `docker container ls` | List all the running docker containers |
@ -68,8 +68,15 @@ zstyle ':omz:plugins:docker' legacy-completion yes
| dritrm | `docker container run --rm -it` | Create a new container, start it in an interactive shell and automatically remove it | | dritrm | `docker container run --rm -it` | Create a new container, start it in an interactive shell and automatically remove it |
| dr | `docker container run` | Create a new container and start it using the specified command | | dr | `docker container run` | Create a new container and start it using the specified command |
| drit | `docker container run -it` | Create a new container and start it in an interactive shell | | drit | `docker container run -it` | Create a new container and start it in an interactive shell |
| dritbash | `docker run -it --entrypoint /bin/bash` | Create a new container and start it in an interactive mode with Bash |
| dritp | `docker container run -it -v $PWD:/pwd -w /pwd` | Create a new container and start it in an interactive mode, mounting current directory as `/pwd` |
| dritprm | `docker container run --rm -it -v $PWD:/pwd -w /pwd` | Create a new container and start it in an interactive mode with auto-removal, mounting current directory as `/pwd` |
| dritsh | `docker run -it --entrypoint /bin/sh` | Create a new container and start it in an interactive mode with shell |
| dritshp | `docker run -it --entrypoint /bin/sh -v $PWD:/pwd -w /pwd` | Create a new container and start it in an interactive mode with shell, mounting current directory as `/pwd` |
| drm | `docker container rm` | Remove the specified container(s) | | drm | `docker container rm` | Remove the specified container(s) |
| drm! | `docker container rm -f` | Force the removal of a running container (uses SIGKILL) | | drm! | `docker container rm -f` | Force the removal of a running container (uses SIGKILL) |
| drma! | `docker container ls -a -q \| xargs docker container rm -f` | Force the removal all containers |
| drp | `docker container run -v $PWD:/pwd -w /pwd` | Run a container with the current directory mounted as `/pwd` |
| dst | `docker container start` | Start one or more stopped containers | | dst | `docker container start` | Start one or more stopped containers |
| drs | `docker container restart` | Restart one or more containers | | drs | `docker container restart` | Restart one or more containers |
| dsta | `docker stop $(docker ps -q)` | Stop all running containers | | dsta | `docker stop $(docker ps -q)` | Stop all running containers |
@ -88,6 +95,6 @@ zstyle ':omz:plugins:docker' legacy-completion yes
## Custom functions (pseudo-aliases) ## Custom functions (pseudo-aliases)
| Name | Function | Description | | Name | Function | Description |
| :------ | :--------------------------------------------- | :-------------------------------------------------------- | | :------- | :---------------------------------------------- | :---------------------------------------------------------------------- |
| dxcsh | `dxcsh() { docker exec -it "$@" /bin/sh }` | Run a interactive shell inside a running docker container | | dxcsh | `dxcsh() { docker exec -it "$@" /bin/sh }` | Run a interactive shell inside a running docker container |
| dxcbash | `dxcbash() { docker exec -it "$@" /bin/bash }` | Run a interactive bash inside a running docker container | | dxcbash | `dxcbash() { docker exec -it "$@" /bin/bash }` | Run a interactive bash inside a running docker container |