= The command ‘docker run --volume /data:/mydata:ro ubuntu’ will mount the host’s ‘/data’
directory to the ubuntu container in read-only mode. The --volume or -v option allows you to mount
a host directory or a file to a container as a volume1. The syntax for this option is:
-v|--volume=[host-src:]container-dest[:]
The host-src can be an absolute path or a name value. The container-dest must be an absolute
path. The options can be a comma-separated list of mount options, such as rofor read-only, rw for
read-write, z or Z for SELinux labels, etc1. In this case, the host-src is /data, the container-dest is
/mydata, and the option is ro, which means the container can only read the data from the volume,
but not write to it2. This can be useful for sharing configuration files or other data that should not be
modified by the container3. Reference:
Use volumes | Docker Documentation
Docker run reference | Docker Documentation
Docker - Volumes - Tutorialspoint