Docker CLI Command Cheat Sheet
2023-09-05
筆記 Docker 的常用的指令,包含簡單輸入方式以及完整輸入方式。
說明
簡短指令與它的完整版本
爽爽輸入的簡短指令,例如 docker attach 其實是完整指令 docker container attach 的簡短版本 😀
🐳 Container Series
| 簡短指令 | 完整指令 |
|---|---|
| attatch | container attach |
| commit | container commit |
| cp | container cp |
| create | container create |
| diff | container diff |
| exec | container exec |
| export | container export |
| inspect | container inspect |
| kill | container kill |
| logs | container logs |
| ps | container ps |
| pause | container pause |
| port | container port |
| rename | container rename |
| restart | container restart |
| rm | container rm |
| start | container start |
| stats | container stats |
| stop | container stop |
| top | container top |
| unpause | container unpause |
| update | container update |
| wait | container wait |
🐳 Image Series
| 簡短指令 | 完整指令 |
|---|---|
| build | image build |
| history | image history |
| images | image images |
| load | image load |
| pull | image pull |
| rmi | image rmi |
| save | image save |
| tag | image tag |
🐳 System Series
| 簡短指令 | 完整指令 |
|---|---|
| events | system events |
| info | system info |
主要指令對象
主要指令對象下,可以在加上副指令,常用的 Container, Image 有簡短版本的指令如以上說明。
docker 主要指令對象 副指令
docker container list
| Management | Info |
|---|---|
| builder | Manage builds |
| checkpoint | Manage checkpoints |
| config | Manage Swarm configs |
| container | Manage containers |
| context | Manage contexts |
| image | Manage images |
| manifest | Manage Docker image manifests and manifest lists |
| network | Manage networks |
| node | Manage Swarm nodes |
| plugin | Manage plugins |
| secret | Manage Swarm secrets |
| service | Manage Swarm services |
| stack | Manage Swarm stacks |
| swarm | Manage Swarm |
| system | Manage Docker |
| trust | Manage trust on Docker images |
| volume | Manage volumes |