Complete the command to mount a local directory /data to /app/data inside the container.
docker run -v [1]:/app/data myimageThe local directory /data should be mounted to /app/data inside the container using -v /data:/app/data.
Complete the command to run a container with a read-only volume mount of /config directory.
docker run -v /config:/app/config:[1] myimagereadonly instead of ro.The :ro option mounts the volume as read-only inside the container.
Fix the error in the command to mount a host directory /var/logs to /logs inside the container.
docker run -v [1] myimageThe correct syntax for volume mount is -v host_path:container_path. Here, /var/logs is the host path and /logs is the container path.
Fill both blanks to create a volume mount that maps /home/user/data on the host to /data in the container with read-write access.
docker run -v [1]:[2] myimage
The volume mount syntax is -v host_path:container_path. Read-write is default, so no extra option is needed.
Fill all three blanks to create a volume mount with /opt/config on the host mapped to /app/config in the container as read-only.
docker run -v [1]:[2]:[3] myimage
rw instead of ro for read-only mount.The correct volume mount is -v /opt/config:/app/config:ro to make it read-only inside the container.