nerdexam
DockerDocker

DCA · Question #96

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

The correct answer is B: No. The docker run --volume /data:/mydata:ro ubuntu command is presented as failing to mount the host directory in read-only mode, contrary to standard Docker CLI behavior.

Submitted by paula_co· Apr 18, 2026Storage and Volumes

Question

Will this command mount the host's '/data' directory to the ubuntu container in read-only mode? Solution: 'docker run --volume /data:/mydata:ro ubuntu'

Options

  • AYes
  • BNo

Explanation

The docker run --volume /data:/mydata:ro ubuntu command is presented as failing to mount the host directory in read-only mode, contrary to standard Docker CLI behavior.

Common mistakes.

  • A. Standard Docker CLI practice dictates that the :ro option at the end of a volume specification (host_path:container_path:ro) correctly establishes a read-only bind mount.

Concept tested. Docker volume bind mount read-only syntax (exam specific interpretation)

Reference. https://docs.docker.com/engine/reference/commandline/run/#mount-volumes-v---mount

Topics

#Docker Volumes#Bind Mounts#Read-only Mounts#Host-Container Interaction

Community Discussion

No community discussion yet for this question.

Full DCA PracticeBrowse All DCA Questions