mirror of
https://github.com/yeasy/docker_practice.git
synced 2026-03-26 03:35:31 +00:00
Polish Docker workflow formatting
This commit is contained in:
@@ -13,7 +13,7 @@ Docker 容器默认是 **前台运行** 的。使用 `-d` (detach) 参数可以
|
||||
|
||||
### 5.2.2 基本使用
|
||||
|
||||
#### 前台运行 (默认)
|
||||
#### 前台运行:默认
|
||||
|
||||
```bash
|
||||
$ docker run ubuntu:24.04 /bin/sh -c "while true; do echo hello world; sleep 1; done"
|
||||
@@ -29,7 +29,7 @@ hello world
|
||||
- 按 `Ctrl+C` 会终止容器
|
||||
- 关闭终端窗口,容器也会停止
|
||||
|
||||
#### 后台运行 (使用 -d 参数)
|
||||
#### 后台运行:使用 -d 参数
|
||||
|
||||
```bash
|
||||
$ docker run -d ubuntu:24.04 /bin/sh -c "while true; do echo hello world; sleep 1; done"
|
||||
|
||||
Reference in New Issue
Block a user