mirror of
https://github.com/containers/podman.git
synced 2026-03-13 08:01:19 +08:00
Merge pull request #21049 from k9withabone/quadlet-ulimit-multiple
quadlet container support multiple Ulimit options
This commit is contained in:
@@ -659,6 +659,8 @@ This key can be listed multiple times.
|
||||
|
||||
Ulimit options. Sets the ulimits values inside of the container.
|
||||
|
||||
This key can be listed multiple times.
|
||||
|
||||
### `Unmask=`
|
||||
|
||||
Specify the paths to unmask separated by a colon. unmask=ALL or /path/1:/path/2, or shell expanded paths (/proc/*):
|
||||
|
||||
@@ -574,8 +574,8 @@ func ConvertContainer(container *parser.UnitFile, names map[string]string, isUse
|
||||
podman.add("--security-opt", fmt.Sprintf("label=level:%s", securityLabelLevel))
|
||||
}
|
||||
|
||||
ulimit, ok := container.Lookup(ContainerGroup, KeyUlimit)
|
||||
if ok && len(ulimit) > 0 {
|
||||
ulimits := container.LookupAll(ContainerGroup, KeyUlimit)
|
||||
for _, ulimit := range ulimits {
|
||||
podman.add("--ulimit", ulimit)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
## assert-podman-final-args localhost/imagename
|
||||
## assert-podman-args "--ulimit nproc:1234:5678"
|
||||
## assert-podman-args --ulimit nproc=1234:5678
|
||||
## assert-podman-args --ulimit cpu=1234:5678
|
||||
|
||||
[Container]
|
||||
Image=localhost/imagename
|
||||
Ulimit=nproc:1234:5678
|
||||
Ulimit=nproc=1234:5678
|
||||
Ulimit=cpu=1234:5678
|
||||
|
||||
@@ -815,6 +815,7 @@ BOGUS=foo
|
||||
Entry("subidmapping-with-remap.container", "subidmapping-with-remap.container", 1, "converting \"subidmapping-with-remap.container\": deprecated Remap keys are set along with explicit mapping keys"),
|
||||
Entry("sysctl.container", "sysctl.container", 0, ""),
|
||||
Entry("timezone.container", "timezone.container", 0, ""),
|
||||
Entry("ulimit.container", "ulimit.container", 0, ""),
|
||||
Entry("unmask.container", "unmask.container", 0, ""),
|
||||
Entry("user.container", "user.container", 0, ""),
|
||||
Entry("userns.container", "userns.container", 0, ""),
|
||||
|
||||
Reference in New Issue
Block a user