Skip to content

Commit

Permalink
fix: add pull log
Browse files Browse the repository at this point in the history
Signed-off-by: 张启航 <[email protected]>
  • Loading branch information
ZhangSetSail committed Nov 20, 2024
1 parent 968e596 commit 8d3294c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions builder/sources/image_containerd_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,14 @@ func (c *containerdImageCliImpl) ImagePull(image string, username, password stri
var img containerd.Image
img, err = c.client.Pull(pctx, reference, opts...)
if err != nil {
logrus.Errorf("HTTPS pull failed for image %s, trying HTTP", reference)
printLog(logger, "warn", fmt.Sprintf("HTTPS pull failed for image %s, trying HTTP", reference), map[string]string{"step": "pullimage"})
hostOpt.DefaultScheme = "http"
options = docker.ResolverOptions{
Tracker: Tracker,
Hosts: config.ConfigureHosts(pctx, hostOpt),
}
logrus.Infof("try again http")
img, err = c.client.Pull(pctx, reference, opts...)
}

Expand Down

0 comments on commit 8d3294c

Please sign in to comment.