Skip to content
Permalink
Browse files
fix: panic when docker image inspect has failed with unexpected error
  • Loading branch information
distorhead committed Nov 25, 2021
1 parent 264a1a6 commit 60117213f3dbb1c60b971568a4eb897a573d6e90
Showing with 2 additions and 0 deletions.
  1. +2 −0 pkg/container_runtime/docker_server_runtime.go
@@ -70,6 +70,8 @@ func (runtime *DockerServerRuntime) GetImageInfo(ctx context.Context, ref string
inspect, err := docker.ImageInspect(ctx, ref)
if client.IsErrNotFound(err) {
return nil, nil
} else if err != nil {
return nil, fmt.Errorf("unable to inspect docker image: %s", err)
}

return image.NewInfoFromInspect(ref, inspect), nil

0 comments on commit 6011721

Please sign in to comment.