Docker Certified Associate (DCA) — Question 49
Will this command mount the host’s ‘/data’ directory to the ubuntu container in read-only mode?
‘docker run --add-volume /data /mydata --read only ubuntu’
Answer options
- A. Yes
- B. No
Correct answer: B
Explanation
The command provided is incorrect because it uses the wrong syntax for mounting a volume in read-only mode. The correct syntax should include the '':/path' format for the volume and the 'readonly' flag should be specified correctly.