Inability to use bind mounts if source is on / #37032
For those suffering from the issue (only Docker CE 18.05 is affected), a quick workaround is to bind mount the directory on the host to itself, i.e. do
I experienced an error mounting a volume with a rshared flag that would be explained by this issue. Besides, the error message matches with the commits mentioned in here. It is happening on the release 18.05.0-ce, but NOT on 18.04.0-ce.
However, the error occurs mounting a different dir than /, and I'd like to double check with you that the fix also applies.
Using the previous release, working example:
For those suffering from the issue, a quick workaround is to bind mount the directory on the host to itself: