mirror of
https://hubproxy.babadafafafafa.cn/https://github.com/1Panel-dev/1Panel.git
synced 2026-09-20 08:03:55 +08:00
fix: Fix the issue where deleting the host mapping in the runtime environment causes an error." (#12779)
This commit is contained in:
@@ -669,7 +669,7 @@ func handleCompose(env gotenv.Env, composeContent []byte, create request.Runtime
|
||||
for _, host := range create.ExtraHosts {
|
||||
extraHosts = append(extraHosts, fmt.Sprintf("%s:%s", host.Hostname, host.IP))
|
||||
}
|
||||
delete(serviceValue, "extraHosts")
|
||||
delete(serviceValue, "extra_hosts")
|
||||
if len(extraHosts) > 0 {
|
||||
serviceValue["extra_hosts"] = extraHosts
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user