container: Use ImageVolumes setting at container creation

Signed-off-by: Mrunal Patel <mpatel@redhat.com>
This commit is contained in:
Mrunal Patel 2017-06-30 11:56:18 -07:00 committed by Mrunal Patel
parent dc55fd2f14
commit d40883d88c

View file

@ -607,8 +607,15 @@ func (s *Server) createSandboxContainer(ctx context.Context, containerID string,
if err != nil {
return nil, err
}
if err1 := os.MkdirAll(fp, 0644); err1 != nil {
return nil, err1
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")
}
}