Test Dockerfile changes safely before merging.
BeginnerScenarioCI/CD and production rollouts
Answer
Situation read → A broken Dockerfile blocks everyone.
What I'd do → PR pipeline: hadolint Dockerfile, docker buildx build --check, build for all target platforms without pushing, run container structure tests (container-structure-test) or a smoke test hitting /healthz.
Why → Catches issues early.
Interview tip → docker build --check validates against Dockerfile build checks.
More on CI/CD and production rollouts
Design a GitHub Actions workflow that builds, scans and pushes an image.IntermediateZero-downtime deploy on a single Docker host.AdvancedDeploy via GitOps with image digests.IntermediateCanary a new image on a Swarm service.AdvancedDocker build is flaky in CI due to network errors on package installs.IntermediateRun database migrations in the deploy flow of containerized apps.Intermediate