forked from tldr-pages/tldr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docker: add Chinese translation (tldr-pages#6230)
- Loading branch information
1 parent
b012cbe
commit 38a68dd
Showing
2 changed files
with
72 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# docker | ||
|
||
> 管理 Docker 容器和镜像。 | ||
> 更多信息: <https://docs.docker.com/engine/reference/commandline/cli/>. | ||
- 列出目前正在运行的 docker 容器: | ||
|
||
`docker ps` | ||
|
||
- 列出所有 docker 容器(包括停止的容器): | ||
|
||
`docker ps -a` | ||
|
||
- 透过镜像启动容器,并为容器命名: | ||
|
||
`docker run --name {{容器名称}} {{镜像}}` | ||
|
||
- 启动或停止现有容器: | ||
|
||
`docker {{start|stop}} {{容器名称}}` | ||
|
||
- 从 docker registry 中拉取镜像: | ||
|
||
`docker pull {{镜像}}` | ||
|
||
- 从正在运行的容器内打开一个 shell: | ||
|
||
`docker exec -it {{容器名称}} {{sh}}` | ||
|
||
- 删除一个停止的容器: | ||
|
||
`docker rm {{容器名称}}` | ||
|
||
- 获取并查看容器的日志: | ||
|
||
`docker logs -f {{容器名称}}` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# docker | ||
|
||
> 管理 Docker 容器和映像檔。 | ||
> 更多資訊: <https://docs.docker.com/engine/reference/commandline/cli/>. | ||
- 列出目前正在運行的 docker 容器: | ||
|
||
`docker ps` | ||
|
||
- 列出所有 docker 容器(包括停止的容器): | ||
|
||
`docker ps -a` | ||
|
||
- 透過映像檔啟動容器,並為容器命名: | ||
|
||
`docker run --name {{容器名稱}} {{映像檔}}` | ||
|
||
- 啟動或停止現有容器: | ||
|
||
`docker {{start|stop}} {{容器名稱}}` | ||
|
||
- 從 docker registry 中拉取映像檔: | ||
|
||
`docker pull {{映像檔}}` | ||
|
||
- 從正在運行的容器內打開一個 shell: | ||
|
||
`docker exec -it {{容器名稱}} {{sh}}` | ||
|
||
- 刪除一個停止的容器: | ||
|
||
`docker rm {{容器名稱}}` | ||
|
||
- 獲取並查看容器的日誌: | ||
|
||
`docker logs -f {{容器名稱}}` |