1
0
镜像自地址 https://github.com/tuna/tunasync.git 已同步 2025-12-06 06:26:46 +00:00

docker: support memory limit

这个提交包含在:
Miao Wang
2021-07-12 22:26:13 +08:00
父节点 3ce5c2ede3
当前提交 f0ccdc47dc
共有 3 个文件被更改,包括 8 次插入0 次删除

查看文件

@@ -56,6 +56,10 @@ func newCmdJob(provider mirrorProvider, cmdAndArgs []string, workingDir string,
kv := fmt.Sprintf("%s=%s", k, v)
args = append(args, "-e", kv)
}
// set memlimit
if d.memoryLimit != 0 {
args = append(args, "-m", fmt.Sprint(d.memoryLimit.Value()))
}
// apply options
args = append(args, d.options...)
// apply image and command