Skip to content

Commit a4ee2d1

Browse files
authored
docker-{container-stop, compose-stop, compose-down}: add Chinese translation (#23624)
1 parent d308208 commit a4ee2d1

3 files changed

Lines changed: 88 additions & 0 deletions

File tree

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# docker compose down
2+
3+
> 停止并移除由 `docker compose up` 创建的容器、网络、镜像和卷。
4+
> 更多信息:<https://docs.docker.com/reference/cli/docker/compose/down/>
5+
6+
- 停止并移除所有容器和网络:
7+
8+
`docker compose down`
9+
10+
- 停止并移除容器、网络以及服务使用的所有镜像:
11+
12+
`docker compose down --rmi all`
13+
14+
- 停止并移除容器、网络以及没有自定义标签的镜像:
15+
16+
`docker compose down --rmi local`
17+
18+
- 停止并移除容器、网络和所有卷:
19+
20+
`docker compose down {{[-v|--volumes]}}`
21+
22+
- 停止并移除所有资源,包括孤立容器:
23+
24+
`docker compose down --remove-orphans`
25+
26+
- 使用另一个 Compose 文件停止并移除容器:
27+
28+
`docker compose {{[-f|--file]}} {{路径/到/配置文件}} down`
29+
30+
- 使用以秒为单位的自定义超时停止并移除容器:
31+
32+
`docker compose down {{[-t|--timeout]}} {{秒数}}`
33+
34+
- 移除 Compose 文件中未定义的服务所对应的容器:
35+
36+
`docker compose down --remove-orphans {{[-v|--volumes]}}`
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# docker compose stop
2+
3+
> 停止正在运行的容器,但不移除它们。
4+
> 更多信息:<https://docs.docker.com/reference/cli/docker/compose/stop>
5+
6+
- 停止所有正在运行的服务:
7+
8+
`docker compose stop`
9+
10+
- 停止指定服务:
11+
12+
`docker compose stop {{服务1 服务2 ...}}`
13+
14+
- 使用以秒为单位的自定义关闭超时停止服务:
15+
16+
`docker compose stop {{[-t|--timeout]}} {{秒数}}`
17+
18+
- 停止指定 Compose 文件中定义的服务:
19+
20+
`docker compose {{[-f|--file]}} {{路径/到/配置文件}} stop`
21+
22+
- 模拟运行(显示操作但不执行):
23+
24+
`docker compose stop --dry-run`
25+
26+
- 使用自定义超时停止指定服务:
27+
28+
`docker compose stop {{[-t|--timeout]}} {{秒数}} {{服务1 服务2 ...}}`
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# docker container stop
2+
3+
> 停止一个或多个正在运行的容器。
4+
> 更多信息:<https://docs.docker.com/reference/cli/docker/container/stop/>
5+
6+
- 停止一个 Docker 容器:
7+
8+
`docker {{[stop|container stop]}} {{容器}}`
9+
10+
- 停止容器,并向其发送指定信号:
11+
12+
`docker {{[stop|container stop]}} {{[-s|--signal]}} {{信号}} {{容器}}`
13+
14+
- 停止容器,并在强制终止前等待指定秒数:
15+
16+
`docker {{[stop|container stop]}} {{[-t|--timeout]}} {{秒数}} {{容器}}`
17+
18+
- 停止一个或多个容器:
19+
20+
`docker {{[stop|container stop]}} {{容器1 容器2 ...}}`
21+
22+
- 显示帮助:
23+
24+
`docker {{[stop|container stop]}} --help`

0 commit comments

Comments
 (0)