mirror of
https://github.com/yeasy/docker_practice.git
synced 2026-03-11 20:31:18 +00:00
Optimize content and fix issues
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
|
||||
本节通过一组最小可用的片段,展示典型 DevOps 流程中与 Docker 相关的关键配置。
|
||||
|
||||
### 1. Dockerfile 多阶段构建
|
||||
#### 1. Dockerfile 多阶段构建
|
||||
|
||||
使用 Docker 多阶段构建可以有效减小镜像体积。
|
||||
|
||||
@@ -36,7 +36,7 @@ COPY --from=builder /app/main .
|
||||
CMD ["./main"]
|
||||
```
|
||||
|
||||
### 2. GitLab CI 配置
|
||||
#### 2. GitLab CI 配置
|
||||
|
||||
GitLab CI(`.gitlab-ci.yml`)配置如下:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user