1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-01-31 14:08:06 +08:00

feat: 解决容器编辑内存限额失败的问题 (#2607)

Refs #2608
This commit is contained in:
ssongliu 2023-10-20 14:16:45 +08:00 committed by wanghe-fit2cloud
parent 609aa04aba
commit a2bfa5acaa

View File

@ -885,6 +885,7 @@ func loadConfigInfo(isCreate bool, req dto.ContainerOperate, oldContainer *types
}
hostConf.NanoCPUs = int64(req.NanoCPUs * 1000000000)
hostConf.Memory = int64(req.Memory * 1024 * 1024)
hostConf.MemorySwap = 0
hostConf.PortBindings = portMap
hostConf.Binds = []string{}
config.Volumes = make(map[string]struct{})