Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/go_modules/github.com/containerd/…
Browse files Browse the repository at this point in the history
…containerd-1.6.16
  • Loading branch information
mdelapenya authored Jan 30, 2023
2 parents 0622480 + 898a14d commit ea04ab5
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 295 deletions.
13 changes: 12 additions & 1 deletion docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,18 @@ func (p *DockerProvider) BuildImage(ctx context.Context, img ImageBuildInfo) (st
ForceRemove: true,
}

resp, err := p.client.ImageBuild(ctx, buildContext, buildOptions)
var resp types.ImageBuildResponse
err = backoff.Retry(func() error {
resp, err = p.client.ImageBuild(ctx, buildContext, buildOptions)
if err != nil {
if _, ok := err.(errdefs.ErrNotFound); ok {
return backoff.Permanent(err)
}
Logger.Printf("Failed to build image: %s, will retry", err)
return err
}
return nil
}, backoff.WithContext(backoff.NewExponentialBackOff(), ctx))
if err != nil {
return "", err
}
Expand Down
Loading

0 comments on commit ea04ab5

Please sign in to comment.