0
0
Dockerdevops~10 mins

Volume vs bind mount decision in Docker - Interactive Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to create a Docker volume named 'data_vol'.

Docker
docker volume [1] data_vol
Drag options to blanks, or click blank then click option'
Arun
Bbuild
Ccreate
Dstart
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'docker volume run' instead of 'create'.
2fill in blank
medium

Complete the code to run a container with a bind mount from host directory '/host/data' to container '/app/data'.

Docker
docker run -v [1]:/app/data myimage
Drag options to blanks, or click blank then click option'
A/host/data
B/data
C/app/data
D/container/data
Attempts:
3 left
💡 Hint
Common Mistakes
Using container path as source instead of host path.
3fill in blank
hard

Fix the error in the command to mount a volume named 'myvol' to '/data' in the container.

Docker
docker run -v [1]:/data myimage
Drag options to blanks, or click blank then click option'
Amyvol_data
Bmyvol:/data
Cvolume:myvol
Dmyvol
Attempts:
3 left
💡 Hint
Common Mistakes
Adding extra text like ':myvol' or including the container path twice.
4fill in blank
hard

Fill all three blanks to create a bind mount from host directory '/var/log' to container directory '/logs' with read-only access.

Docker
docker run -v [1]:[2]:[3] myimage
Drag options to blanks, or click blank then click option'
A/var/log
B/logs
Cro
Drw
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'rw' instead of 'ro' for read-only mounts.
5fill in blank
hard

Fill all three blanks to create a volume mount with a named volume 'cache_vol', mounted to '/cache' in the container with read-write access.

Docker
docker run -v [1]:[2]:[3] myimage
Drag options to blanks, or click blank then click option'
Acache_vol
B/cache
Crw
Dro
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'ro' instead of 'rw' for read-write mounts.