基础设施与运维
docker-compose-stack
更新于 2026-11-07
Docker Compose 工程规则
Compose rules: explicit healthchecks, pinned images and network segmentation
- 技术栈
- Docker Compose
- 主题
- 工程基线
- 条目
- 9 条
- 版本
- v0.2.0
✓ 应当这么做
- ✓ Use multi-stage builds and copy only runtime artifacts into the final image
- ✓ Run as a non-root user and pin base images by digest for reproducibility
- ✓ Mount secrets at runtime instead of baking them into layers
✕ 常见反模式
- ✕ `latest` tags in production deployments
- ✕ Build credentials present in intermediate layers
- ✕ Running the application as PID 1 without a signal-aware entrypoint
◎ 交付前验证
- ◎ Image scanned and no new critical CVEs introduced
- ◎ Container exits cleanly on SIGTERM within the grace period
- ◎ Final image size compared against the previous build
同分类条目
38 篇基础设施与运维
Docker 工程规则
Production Dockerfile rules: minimal multi-stage images and non-root runtime
基础设施与运维
Kubernetes 工程规则
Kubernetes rules: resource limits, readiness probes and rolling-update safety
基础设施与运维
Helm 工程规则
Helm rules: values schema validation and template-time guard rails
基础设施与运维
Terraform 工程规则
Terraform rules: locked remote state, reviewed plans and no console drift
基础设施与运维
Ansible 工程规则
Ansible rules: idempotent tasks, changed_when discipline and vaulted secrets
基础设施与运维
TLS Automation 工程规则
TLS rules: automated issuance, renewal monitoring and pinned protocol versions