Skip to content

Commit

Permalink
fix: build docker image failure
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhangSetSail committed Jan 17, 2024
1 parent 84baabf commit d8e1bc2
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions builder/parser/docker_run.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,13 @@ func (d *DockerRunOrImageParse) Parse() ParseErrorList {
d.image = ParseImageName(d.source)
}
//获取镜像,验证是否存在
if d.user == "" {
d.user = builder.REGISTRYUSER
}
if d.pass == "" {
d.pass = builder.REGISTRYPASS
if strings.HasPrefix(d.image.Source(), builder.REGISTRYDOMAIN) {
if d.user == "" {
d.user = builder.REGISTRYUSER
}
if d.pass == "" {
d.pass = builder.REGISTRYPASS
}
}
imageInspect, err := d.imageClient.ImagePull(d.image.Source(), d.user, d.pass, d.logger, 10)
if err != nil {
Expand Down

0 comments on commit d8e1bc2

Please sign in to comment.