You must deploy the same container to dev and prod in Container Apps with different settings. What varies?
Why B is the answer
Environment variables and secrets set for each environment
Build once and configure per environment, so that what you tested is what you ship.
In detail
- Build one image.
- Set environment variables and secrets for each environment.
- Promote the same tested image.
Use case
An illustrative scenario, not a real incident.
A team deploys one image to dev and prod, and only environment variables and secrets differ.
See it in different ways
sequenceDiagram participant A as App participant C as App Configuration participant V as Key Vault A->>C: Reads settings and flags C-->>A: Key Vault reference A->>V: Reads the secret, with its managed identity V-->>A: Current value
mindmap
root(("Environments"))
n1["Stays the same"]
n2["The image"]
n3["Varies"]
n4["Environment variables"]
n5["Secrets"]Key point: One image, different configuration.
Why the other options are wrong
- A. The image itself, rebuilt for each environment with values inside
- Rebuilding means dev and prod run different images.
- C. The Dockerfile, with one copy of the file for each environment
- Copies of the Dockerfile will drift.
- D. The name of the base image, chosen by each team by hand
- Different base images mean different software.

