daemon/archive_unix.go
47c56e43
 // +build !windows
 
 package daemon
 
9c332b16
 import (
7f665985
 	"github.com/docker/docker/container"
e89b6e8c
 	"github.com/docker/docker/volume"
9c332b16
 )
6bb0d181
 
47c56e43
 // checkIfPathIsInAVolume checks if the path is in a volume. If it is, it
 // cannot be in a read-only volume. If it  is not in a volume, the container
 // cannot be configured with a read-only rootfs.
6bb0d181
 func checkIfPathIsInAVolume(container *container.Container, absPath string) (bool, error) {
47c56e43
 	var toVolume bool
d98ecf2d
 	parser := volume.NewParser(container.OS)
47c56e43
 	for _, mnt := range container.MountPoints {
e89b6e8c
 		if toVolume = parser.HasResource(mnt, absPath); toVolume {
47c56e43
 			if mnt.RW {
 				break
 			}
 			return false, ErrVolumeReadonly
 		}
 	}
 	return toVolume, nil
 }
9c332b16
 
481d2633
 // isOnlineFSOperationPermitted returns an error if an online filesystem operation
 // is not permitted.
 func (daemon *Daemon) isOnlineFSOperationPermitted(container *container.Container) error {
 	return nil
 }