Docker Volumes Deep Dive
Different --mount Options This tutorial helps you to understand different mount options, storage drivers, volume drivers(plugins) and troubleshooting issues with Storage Driver(Overlay2). — Thiru Volumes are the preferred mechanism to persist container data. bind mounts are dependant on host machine directory structure but volumes are completely managed by docker. more on volumes… Tip You can use --mount or --volume to create volume , --mount is recommended for newer docker(>17.06). Different --mount Options The --mount option allows us to create different kinds of volumes, below is syntax to use --mount option. mount.sh docker run --mount type=<bind|volume|tmpfs>, source=<NameOfVolume/hostDirectory>, destination=<NameInsideContainer>, readOnly, volume-opt k=v, volume-opt k=v, <docker-image:tag>