Skip to content

Commit

Permalink
fix: tag image failure (#2052)
Browse files Browse the repository at this point in the history
Signed-off-by: 张启航 <[email protected]>
  • Loading branch information
ZhangSetSail authored Nov 19, 2024
1 parent 9a931a3 commit 2124916
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions builder/sources/image_containerd_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,13 @@ func (c *containerdImageCliImpl) ImageTag(source, target string, logger event.Lo
return err
}
srcImage := srcNamed.String()

if strings.HasPrefix(target, "https://") {
target = strings.TrimPrefix(target, "https://")
} else if strings.HasPrefix(target, "http://") {
target = strings.TrimPrefix(target, "http://")
}

targetNamed, err := refdocker.ParseDockerRef(target)
if err != nil {
return err
Expand Down

0 comments on commit 2124916

Please sign in to comment.