container: Use ImageVolumes setting at container creation
@@ -607,9 +607,16 @@ func (s *Server) createSandboxContainer(ctx context.Context, containerID string,
if err != nil {
return nil, err
}
+ switch s.config.ImageVolumes {
+ case ImageVolumesMkdir:
if err1 := os.MkdirAll(fp, 0644); err1 != nil {
return nil, err1
}
+ case ImageVolumesIgnore:
+ logrus.Debugf("Ignoring volume %v", dest)
+ default:
+ logrus.Fatalf("Unrecognized image volumes setting")
+ }
}
processArgs, err := buildOCIProcessArgs(containerConfig, containerImageConfig)
