mirror of
https://github.com/yeasy/docker_practice.git
synced 2026-03-26 03:35:31 +00:00
Add blank lines around headers
This commit is contained in:
@@ -35,6 +35,7 @@ WORKDIR /app
|
||||
COPY --from=builder /app/main .
|
||||
CMD ["./main"]
|
||||
```
|
||||
|
||||
#### 2. GitLab CI 配置
|
||||
|
||||
GitLab CI(`.gitlab-ci.yml`)配置如下:
|
||||
@@ -74,6 +75,7 @@ deploy_staging:
|
||||
only:
|
||||
- develop
|
||||
```
|
||||
|
||||
### 21.1.3 最佳实践
|
||||
|
||||
1. **不可变基础设施**:一旦镜像构建完成,在各个环境(Dev、Staging、Prod)中都应该使用同一个镜像 tag(通常是 commit hash),而不是重新构建。
|
||||
|
||||
Reference in New Issue
Block a user