mirror of
https://github.com/yeasy/docker_practice.git
synced 2026-03-11 04:14:38 +00:00
Fix errors
This commit is contained in:
@@ -216,6 +216,12 @@ $ docker compose scale web=3 db=2
|
||||
|
||||
将启动 3 个容器运行 web 服务,2 个容器运行 db 服务。
|
||||
|
||||
> **提示**:部分版本的 Compose 可能不再提供独立的 `scale` 子命令(或不推荐使用)。此时可使用 `docker compose up` 的 `--scale` 选项达到同样效果:
|
||||
>
|
||||
> ```bash
|
||||
> $ docker compose up -d --scale web=3 --scale db=2
|
||||
> ```
|
||||
|
||||
一般的,当指定数目多于该服务当前实际运行容器,将新创建并启动容器;反之,将停止容器。
|
||||
|
||||
选项:
|
||||
|
||||
Reference in New Issue
Block a user