archive_unix.go 801 B

1234567891011121314151617181920212223242526272829
  1. // +build !windows
  2. package daemon
  3. import (
  4. "github.com/docker/docker/container"
  5. )
  6. // checkIfPathIsInAVolume checks if the path is in a volume. If it is, it
  7. // cannot be in a read-only volume. If it is not in a volume, the container
  8. // cannot be configured with a read-only rootfs.
  9. func checkIfPathIsInAVolume(container *container.Container, absPath string) (bool, error) {
  10. var toVolume bool
  11. for _, mnt := range container.MountPoints {
  12. if toVolume = mnt.HasResource(absPath); toVolume {
  13. if mnt.RW {
  14. break
  15. }
  16. return false, ErrVolumeReadonly
  17. }
  18. }
  19. return toVolume, nil
  20. }
  21. // isOnlineFSOperationPermitted returns an error if an online filesystem operation
  22. // is not permitted.
  23. func (daemon *Daemon) isOnlineFSOperationPermitted(container *container.Container) error {
  24. return nil
  25. }