Browse Source

compose examples: added explanation why not using named volumes

https://github.com/moby/moby/pull/17034#issuecomment-163361073
https://github.com/moby/moby/pull/17034/files#diff-6896c3d2994ef80758bb7e38c07eb76bR103
Fabian Peter Hammerle 5 years ago
parent
commit
17c2652315

+ 6 - 1
examples/rsync-sshd-incl-gpg-enc-pwd/docker-compose.yml

@@ -11,7 +11,12 @@ services:
     volumes:
     - plain_data:/plain/data:ro
     - encfs_password:/secret
-    # TODO replace host path with named volume
+    # Currently docker does not allow changing
+    # the mount propagation setting for named volumes.
+    # https://github.com/moby/moby/pull/17034#issuecomment-163361073
+    # https://github.com/moby/moby/pull/17034/files#diff-6896c3d2994ef80758bb7e38c07eb76bR103
+    # https://github.com/moby/moby/blob/675144ff8d251a97322859a78f28ed4f988d3a74/volume/volume_unix.go#L100
+    # So we bind mount a host dir instead.
     - /mnt/encrypted:/encrypted:shared
     networks: []
     devices: [/dev/fuse]

+ 5 - 6
examples/rsync-sshd/docker-compose.yml

@@ -11,12 +11,11 @@ services:
     volumes:
     - plain_data:/plain/data:ro
     - encfs_password:/secret
-    # TODO replace host path with named volume
-    # [...] the local driver accepts mount options as a comma-separated list in the o parameter.
-    # https://docs.docker.com/storage/volumes/
-    #
-    # update 2019-03-27: adding 'shared' to volumes.*.driver_opts.o did not suffice.
-    # got inspired by https://github.com/docker/compose/issues/2957#issuecomment-403175803
+    # Currently docker does not allow changing
+    # the mount propagation setting for named volumes.
+    # https://github.com/moby/moby/pull/17034#issuecomment-163361073
+    # https://github.com/moby/moby/pull/17034/files#diff-6896c3d2994ef80758bb7e38c07eb76bR103
+    # So we bind mount a host dir instead.
     - /mnt/encrypted:/encrypted:shared
     networks: []
     devices: [/dev/fuse]