Merge pull request #2656 from giuseppe/fix-rootfs-segfault

container: check containerInfo.Config before accessing it
This commit is contained in:
OpenShift Merge Robot
2019-03-15 04:52:33 -07:00
committed by GitHub

View File

@ -337,11 +337,13 @@ func (c *Container) setupStorage(ctx context.Context) error {
} }
// Set the default Entrypoint and Command // Set the default Entrypoint and Command
if c.config.Entrypoint == nil { if containerInfo.Config != nil {
c.config.Entrypoint = containerInfo.Config.Config.Entrypoint if c.config.Entrypoint == nil {
} c.config.Entrypoint = containerInfo.Config.Config.Entrypoint
if c.config.Command == nil { }
c.config.Command = containerInfo.Config.Config.Cmd if c.config.Command == nil {
c.config.Command = containerInfo.Config.Config.Cmd
}
} }
artifacts := filepath.Join(c.config.StaticDir, artifactsDir) artifacts := filepath.Join(c.config.StaticDir, artifactsDir)