fix: untag duplicate image in case of docker
This commit is contained in:
parent
cdfa480479
commit
c3c97c3828
@ -97,13 +97,23 @@ func Load(localpath string, name string) (err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd = exec.Command(Runtime, "tag", "localhost/"+name, name)
|
if strings.Contains(Runtime, "docker") {
|
||||||
log.Debug().Msgf("%v", cmd)
|
var err2 error
|
||||||
|
cmd = exec.Command(Runtime, "tag", "localhost/"+name, name)
|
||||||
|
log.Debug().Msgf("%v", cmd)
|
||||||
|
|
||||||
raw, err = cmd.CombinedOutput()
|
raw, err2 = cmd.CombinedOutput()
|
||||||
if err != nil {
|
if err2 != nil {
|
||||||
log.Debug().Err(err).Msg(string(raw))
|
log.Debug().Err(err2).Msg(string(raw))
|
||||||
return
|
}
|
||||||
|
|
||||||
|
cmd = exec.Command(Runtime, "rmi", "localhost/"+name)
|
||||||
|
log.Debug().Msgf("%v", cmd)
|
||||||
|
|
||||||
|
raw, err2 = cmd.CombinedOutput()
|
||||||
|
if err2 != nil {
|
||||||
|
log.Debug().Err(err2).Msg(string(raw))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user