Navigation Menu

Skip to content

Commit

Permalink
fix: panic when docker image inspect has failed with unexpected error
Browse files Browse the repository at this point in the history
  • Loading branch information
distorhead committed Nov 25, 2021
1 parent 264a1a6 commit 6011721
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/container_runtime/docker_server_runtime.go
Expand Up @@ -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
Expand Down

0 comments on commit 6011721

Please sign in to comment.