fix: Fix the problem of adding exceptions to the image repository (#8585)

This commit is contained in:
ssongliu 2025-05-09 22:50:20 +08:00 committed by GitHub
parent 123a2e8998
commit f0375a83bb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -222,8 +222,10 @@ func (u *ImageRepoService) handleRegistries(newHost, delHost, handle string) err
if err != nil {
return err
}
if err := json.Unmarshal(file, &daemonMap); err != nil {
return err
if len(file) != 0 {
if err := json.Unmarshal(file, &daemonMap); err != nil {
return err
}
}
iRegistries := daemonMap["insecure-registries"]