Interview Prep/Docker/CI/CD and production rollouts

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.

All Docker questions Roadmap: Docker & containers

More on CI/CD and production rollouts