1
0
Fork 0
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:
Simon Ferquel 2017-08-01 19:32:44 +02:00 committed by Victor Vieux
parent d60c186667
commit e89b6e8c2d
33 changed files with 1467 additions and 1291 deletions

View file

@ -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
}