Exam DCA Topic 5 Question 145 Discussion
Actual exam question for Docker's DCA exam
Question #: 145
Topic #: 5
Question #: 145
Topic #: 5
Will this command mount the host's '/data1directory to the ubuntu container in read-only mode?
Solution. 'docker run -v /data:/mydata -mode readonly ubuntu'
Solution. 'docker run -v /data:/mydata -mode readonly ubuntu'
Suggested Answer: B Vote an answer
The command docker run -v /data:/mydata -mode readonly ubuntu will not mount the host's /data1 directory to the ubuntu container in read-only mode. The commandhas several errors that prevent it from working correctly. First, the host directory should be /data1 instead of /data, as specified in the question. Second, the option flag should be --mode instead of -mode, and it should be placed before the image name. Third, the mode value should be ro instead of readonly, as per the Docker documentation1. The correct command should be docker run -v /data1:/mydata --mode ro ubuntu, which will mount the host's /data1 directory as a read-only volume at /mydata inside the container1. Reference:
docker run | Docker Docs
docker run | Docker Docs
by Wright at Oct 14, 2026, 09:42 AM
0
0
0
10
Comments
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Report Comment
Commenting
You can sign-up / login (it's free).