Compare commits

...
Author SHA1 Message Date
wanghe-fit2cloud 3a888d289f fix app image pull check 2026-06-12 14:10:20 +08:00
2 changed files with 15 additions and 0 deletions
+9
View File
@@ -788,6 +788,15 @@ func upgradeInstall(req request.AppInstallUpgrade) error {
err = buserr.WithNameAndErr("ErrDockerPullImage", "", err)
return err
}
exist, err := dockerCLi.ImageExists(image)
if err != nil {
err = buserr.WithNameAndErr("ErrDockerPullImage", "", err)
return err
}
if !exist {
err = buserr.WithNameAndErr("ErrDockerPullImage", "", fmt.Errorf("image %s not found", image))
return err
}
t.LogSuccess(i18n.GetMsgByKey("PullImage"))
}
}
+6
View File
@@ -208,6 +208,12 @@ func (c Client) PullImageWithProcessAndOptions(task *task.Task, imageName string
}
return err
}
if msg, ok := progress["errorDetail"]; ok {
return fmt.Errorf("image pull failed, err: %v", msg)
}
if msg, ok := progress["error"]; ok {
return fmt.Errorf("image pull failed, err: %v", msg)
}
status, _ := progress["status"].(string)
if status == "Downloading" || status == "Extracting" {
logProcess(progress, task)