advancedTop 100 Interview Questions
How should environment-specific configuration (dev/staging/prod) be handled for a single containerized Spring Boot image?
Build one immutable image and inject environment-specific configuration externally at runtime via environment variables or Spring profiles activated by an environment variable (`SPRING_PROFILES_ACTIVE`), rather than baking environment-specific config into separate images per environment — this preserves the 'build once, deploy anywhere' principle.
This is a Pro chapter
Sign in, then upgrade to Pro or Power to unlock this and the full DevOps Mastery library.
How should environment-specific configuration (dev/staging/prod) be handled for a single containerized Spring Boot image?