Docker & Containers (50 Qs)•Part 3: Advanced Internals, Scale & Production Security (Senior / Lead)
Architecting an Enterprise Golden Image Pipeline & Container Governance.
senior LevelCode ExamplePipesSecurity & AuthDocker & Containers
In Simple Words: In large enterprises with hundreds of microservices, letting each team write arbitrary Dockerfiles from scratch leads to security vulnerabilities and bloated images.
less
[ Central Platform Team ]
|
v
[ Golden Base Images (Alpine/Debian-Slim/Distroless) ]
- Hardened OS packages, root certificates, monitoring agents
- Automatic weekly CVE patching pipeline
|
v
[ Application Engineering Teams ]
- FROM internal-registry.company.com/golden-node:20
- Copy app code, run multi-stage build
|
v
[ CI/CD Gateways (Trivy + Cosign) ]
- Reject images with Critical CVEs
- Cryptographically sign approved digests
|
v
[ Kubernetes Clusters (Admission Webhook) ]
- Kyverno/Gatekeeper verifies Cosign signature before scheduling
Core Golden Rules:
- No External Base Images: Block pulling directly from Docker Hub; all images must pull from verified internal mirrors.
- Immutable Digest Pinning: Pin base images to cryptographic SHA256 digests (
FROM node@sha256:...) instead of floating tags (:latest). - Automated Base Image Patching: When an OS security patch is released, base images are rebuilt and downstream microservices auto-trigger rebuilds in CI/CD.