mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Volume refactoring for LCOW
Signed-off-by: Simon Ferquel <simon.ferquel@docker.com>
This commit is contained in:
parent
d60c186667
commit
e89b6e8c2d
33 changed files with 1467 additions and 1291 deletions
|
|
@ -4,6 +4,7 @@ package daemon
|
|||
|
||||
import (
|
||||
"github.com/docker/docker/container"
|
||||
"github.com/docker/docker/volume"
|
||||
)
|
||||
|
||||
// checkIfPathIsInAVolume checks if the path is in a volume. If it is, it
|
||||
|
|
@ -11,8 +12,9 @@ import (
|
|||
// cannot be configured with a read-only rootfs.
|
||||
func checkIfPathIsInAVolume(container *container.Container, absPath string) (bool, error) {
|
||||
var toVolume bool
|
||||
parser := volume.NewParser(container.Platform)
|
||||
for _, mnt := range container.MountPoints {
|
||||
if toVolume = mnt.HasResource(absPath); toVolume {
|
||||
if toVolume = parser.HasResource(mnt, absPath); toVolume {
|
||||
if mnt.RW {
|
||||
break
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue