Resource limits seem to work ok when not rootless
parent
024cd6b108
commit
19be5619d6
|
@ -139,11 +139,10 @@ func CreateContainerNode(p CreateParams) error {
|
|||
}
|
||||
if p.OCIBinary == Docker {
|
||||
runArgs = append(runArgs, "--volume", fmt.Sprintf("%s:/var", p.Name))
|
||||
// setting resource limit in privileged mode is only supported by docker
|
||||
// podman error: "Error: invalid configuration, cannot set resources with rootless containers not using cgroups v2 unified mode"
|
||||
runArgs = append(runArgs, fmt.Sprintf("--cpus=%s", p.CPUs), fmt.Sprintf("--memory=%s", p.Memory))
|
||||
}
|
||||
|
||||
runArgs = append(runArgs, fmt.Sprintf("--cpus=%s", p.CPUs), fmt.Sprintf("--memory=%s", p.Memory))
|
||||
|
||||
for key, val := range p.Envs {
|
||||
runArgs = append(runArgs, "-e", fmt.Sprintf("%s=%s", key, val))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue