diff options
author | Akihiro Suda <suda.akihiro@lab.ntt.co.jp> | 2018-10-10 19:20:13 +0900 |
---|---|---|
committer | Akihiro Suda <suda.akihiro@lab.ntt.co.jp> | 2018-11-06 17:51:58 +0900 |
commit | 596cdffb9fdea5323ccd7196f196544912b59c1f (patch) | |
tree | aed63a71ad131c1f0cec559987f2debabd1fea03 /volume/mounts | |
parent | 12bba16306dd618883fe2e85ef1730efc572294f (diff) | |
download | docker-596cdffb9fdea5323ccd7196f196544912b59c1f.tar.gz |
mount: add BindOptions.NonRecursive (API v1.40)
This allows non-recursive bind-mount, i.e. mount(2) with "bind" rather than "rbind".
Swarm-mode will be supported in a separate PR because of mutual vendoring.
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Diffstat (limited to 'volume/mounts')
-rw-r--r-- | volume/mounts/linux_parser.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/volume/mounts/linux_parser.go b/volume/mounts/linux_parser.go index 8e436aec0e..035a24a8d9 100644 --- a/volume/mounts/linux_parser.go +++ b/volume/mounts/linux_parser.go @@ -97,6 +97,9 @@ func (p *linuxParser) validateMountConfigImpl(mnt *mount.Mount, validateBindSour return &errMountConfig{mnt, fmt.Errorf("must not set ReadOnly mode when using anonymous volumes")} } case mount.TypeTmpfs: + if mnt.BindOptions != nil { + return &errMountConfig{mnt, errExtraField("BindOptions")} + } if len(mnt.Source) != 0 { return &errMountConfig{mnt, errExtraField("Source")} } |