mirror of
https://github.com/moby/moby.git
synced 2026-01-11 10:41:43 +00:00
mounts/validate: Don't check source exists with CreateMountpoint
Don't error out when mount source doesn't exist and mounts has
`CreateMountpoint` option enabled.
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
(cherry picked from commit 05b883bdc8)
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
This commit is contained in:
committed by
Akihiro Suda
parent
e0b4fc1aae
commit
02aa896934
@@ -82,7 +82,9 @@ func (p *linuxParser) validateMountConfigImpl(mnt *mount.Mount, validateBindSour
|
||||
if err != nil {
|
||||
return &errMountConfig{mnt, err}
|
||||
}
|
||||
if !exists {
|
||||
|
||||
createMountpoint := mnt.BindOptions != nil && mnt.BindOptions.CreateMountpoint
|
||||
if !exists && !createMountpoint {
|
||||
return &errMountConfig{mnt, errBindSourceDoesNotExist(mnt.Source)}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user