container: check containerInfo.Config before accessing it
check that containerInfo.Config is not nil before trying to access
it.
Closes:
@@ -337,12 +337,14 @@ func (c *Container) setupStorage(ctx context.Context) error {
}
// Set the default Entrypoint and Command
+ if containerInfo.Config != nil {
if c.config.Entrypoint == nil {
c.config.Entrypoint = containerInfo.Config.Config.Entrypoint
}
if c.config.Command == nil {
c.config.Command = containerInfo.Config.Config.Cmd
}
+ }
artifacts := filepath.Join(c.config.StaticDir, artifactsDir)
if err := os.MkdirAll(artifacts, 0755); err != nil {
