Interview Prep/Docker/Architecture & Design Decisions

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.

All Docker questions Roadmap: Docker & containers

More on Architecture & Design Decisions