Skip to content

Commit

Permalink
Merge pull request moby#47780 from AkihiroSuda/cherrypick-createmount…
Browse files Browse the repository at this point in the history
…point-23

[23.0] mounts/validate: Don't check source exists with CreateMountpoint
  • Loading branch information
thaJeztah authored Apr 30, 2024
2 parents ab34280 + 18e21f8 commit d839fdc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion volume/mounts/linux_parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,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)}
}
}
Expand Down

0 comments on commit d839fdc

Please sign in to comment.