mirror of
https://github.com/containers/podman-compose.git
synced 2024-11-22 16:03:16 +01:00
FIXES #228: Add support for uidmap and gidmap
Implement an x-podman extension on the level of the individual services to handle `--uidmap` and `--gidmap`
This commit is contained in:
parent
a9723ec1cf
commit
e511e6420f
@ -1070,6 +1070,14 @@ def container_to_args(compose, cnt, detached=True):
|
||||
if "retries" in healthcheck:
|
||||
podman_args.extend(["--healthcheck-retries", str(healthcheck["retries"])])
|
||||
|
||||
# handle podman extension
|
||||
x_podman = cnt.get("x-podman", None)
|
||||
if x_podman is not None:
|
||||
for uidmap in x_podman.get("uidmaps", []):
|
||||
podman_args.extend(["--uidmap", uidmap])
|
||||
for gidmap in x_podman.get("gidmaps", []):
|
||||
podman_args.extend(["--gidmap", gidmap])
|
||||
|
||||
podman_args.append(cnt["image"]) # command, ..etc.
|
||||
command = cnt.get("command", None)
|
||||
if command is not None:
|
||||
|
Loading…
Reference in New Issue
Block a user