Add blank lines around headers

This commit is contained in:
yeasy
2026-03-24 09:27:04 -07:00
parent 857e3b73f6
commit ae8636e96f
112 changed files with 468 additions and 0 deletions

View File

@@ -37,6 +37,7 @@ def hello():
if __name__ == "__main__":
app.run(host="0.0.0.0", debug=True)
```
#### Dockerfile
编写 `Dockerfile` 文件内容为
@@ -48,6 +49,7 @@ WORKDIR /code
RUN pip install redis flask
CMD ["python", "app.py"]
```
#### compose.yaml
编写 `compose.yaml` 文件这是 Compose 推荐使用的主模板文件 (也兼容 `docker-compose.yml` 等历史文件名)
@@ -62,6 +64,7 @@ services:
redis:
image: "redis:alpine"
```
#### 运行 compose 项目
```bash
@@ -77,11 +80,13 @@ $ docker compose up
```bash
$ docker compose up -d
```
#### 停止
```bash
$ docker compose stop
```
#### 进入服务
```bash
@@ -90,31 +95,37 @@ $ docker compose exec redis sh
127.0.0.1:6379> get hits
"9"
```
#### 查看日志
```bash
$ docker compose logs -f
```
#### 构建镜像
```bash
$ docker compose build
```
#### 启动服务
```bash
$ docker compose start
```
#### 运行一次性命令
```bash
$ docker compose run web python app.py
```
#### 验证 Compose 文件
```bash
$ docker compose config
```
#### 删除项目
```bash