O'Reilly logo
  • Angel Rodriguez thinks this is interesting:

Note that we have used the -v argument to mount a known directory on the host and --volumes-from to connect the new container to the Redis database folder.

From

Cover of Using Docker

Note

-v, --volume=[host-src:]container-dest[:<options>]: Bind mount a volume. The comma-delimited options are [rw|ro], [z|Z], [[r]shared|[r]slave|[r]private], and [nocopy]. The 'host-src' is an absolute path or a name value.

If neither 'rw' or 'ro' is specified then the volume is mounted in read-write mode.

The nocopy modes is used to disable automatic copying requested volume path in the container to the volume storage location. For named volumes, copy is the default mode. Copy modes are not supported for bind-mounted volumes.

--volumes-from="": Mount all volumes from the given container(s)