How would you design a container build-and-deploy pipeline from commit to production?
AdvancedProductionArchitecture & Design Decisions
Answer
flowchart LR
A[Commit] --> B[CI: lint + unit tests]
B --> C[Build with BuildKit + cache]
C --> D[Trivy scan + SBOM]
D --> E[Push to registry by SHA]
E --> F[Sign with cosign]
F --> G[Update GitOps repo digest]
G --> H[Deploy to staging]
H --> I[Smoke tests]
I --> J[Promote same digest to prod]
Key principles: build once, promote the digest, gate on scan and tests, sign and verify at admission, and keep deploy state in Git so rollback is a revert.
More on Architecture & Design Decisions
When should you use Docker Compose, Swarm, ECS, or Kubernetes?IntermediateHow do you decide how many processes belong in one container?BeginnerHow do you design the config strategy for containerized apps (12-factor)?IntermediateHow would you containerize a legacy app that writes to local disk and holds sessions in memory?AdvancedAlpine or Debian-slim for a Python service?IntermediateHow do you structure a reverse proxy in front of containers?Intermediate