DCA Exam QuestionsBrowse all questions from this exam

DCA Exam - Question 26


An application image runs in multiple environments, with each environment using different certificates and ports. Is this a way to provision configuration to containers at runtime?

Create a Dockerfile for each environment, specifying ports and Docker secrets for certificates.

Show Answer
Correct Answer:

Discussion

3 comments
Sign in to comment
ubdubdoo
Jun 11, 2024

B While technically possible, creating a separate Dockerfile for each environment is not the most efficient or scalable way to manage configurations that vary across environments.

LavaPupOption: B
Dec 7, 2024

B is correct.

__rajan__Option: B
Jan 8, 2025

Creating separate Dockerfiles for each environment: * Violates the "build once, run anywhere" principle * Makes maintenance more difficult * Increases the risk of configuration drift * Requires rebuilding images for configuration changes * Goes against Docker best practices The better approaches for handling environment-specific configurations - Using Docker Configs and Secrets, Using Environment Variables, Using Docker Volumes.