container: Use ImageVolumes setting at container creation
Signed-off-by: Mrunal Patel <mpatel@redhat.com>
This commit is contained in:
parent
dc55fd2f14
commit
d40883d88c
1 changed files with 9 additions and 2 deletions
|
@ -607,8 +607,15 @@ func (s *Server) createSandboxContainer(ctx context.Context, containerID string,
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
if err1 := os.MkdirAll(fp, 0644); err1 != nil {
|
switch s.config.ImageVolumes {
|
||||||
return nil, err1
|
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")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue