Handle environment-specific build args without separate images.
BeginnerScenarioCI/CD and production rollouts
Answer
Situation read → Front-end apps embedding API URLs at build time.
What I'd do → Use runtime config: serve /config.js generated at container start from env vars via entrypoint (envsubst), so one image runs everywhere.
Why → Avoids per-environment builds.
Interview tip → Build-time injection is only acceptable for non-env-specific values.
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