nerdexam
DockerDocker

DCA · Question #34

DCA Question #34: Real Exam Question with Answer & Explanation

The correct answer is A: docker commit. To store changes to a Docker image in a version control system according to DevOps best practices, a Dockerfile is the appropriate method.

Submitted by lars.no· Apr 18, 2026Image Creation, Management, and Registry

Question

From a DevOps process standpoint, it is best practice to keep changes to an application in version control. Which of the following will allow changes to a docker Image to be stored in a version control system?

Options

  • Adocker commit
  • Bdocker save
  • CA docker-compose.yml file
  • DA dockerfile

Explanation

To store changes to a Docker image in a version control system according to DevOps best practices, a Dockerfile is the appropriate method.

Common mistakes.

  • A. The docker commit command creates a new image from a running container's state, but the changes are not recorded in a human-readable, version-controlled script, making it non-reproducible and an anti-pattern for version control.
  • B. The docker save command exports an image to a tar archive, which is a binary representation of the image and cannot be version-controlled in terms of its changes or definitions.
  • C. A docker-compose.yml file defines how multi-container applications are run and orchestrated, but it does not specify how individual Docker images are built or track their internal changes for version control.

Concept tested. Dockerfile for reproducible image builds and version control

Reference. https://docs.docker.com/engine/reference/builder/

Topics

#docker commit#Image Creation#Image Versioning#Version Control

Community Discussion

No community discussion yet for this question.

Full DCA PracticeBrowse All DCA Questions