forked from extern/podman-compose
Add support for cap_add/cap_drop
Currently, `cap_add` and `cap_drop` are being ignored by podman-compose. Add the arguments (`--cap-add` and `--cap-drop`, respectively) to `podman create` when appropriate.
This commit is contained in:
parent
7f210ffc43
commit
e8147e350b
@ -525,6 +525,10 @@ def container_to_args(compose, cnt, detached=True, podman_command='run'):
|
|||||||
if net:
|
if net:
|
||||||
podman_args.extend(['--network', net])
|
podman_args.extend(['--network', net])
|
||||||
env = norm_as_list(cnt.get('environment', {}))
|
env = norm_as_list(cnt.get('environment', {}))
|
||||||
|
for c in cnt.get('cap_add', []):
|
||||||
|
podman_args.extend(['--cap-add', c])
|
||||||
|
for c in cnt.get('cap_drop', []):
|
||||||
|
podman_args.extend(['--cap-drop', c])
|
||||||
for d in cnt.get('devices', []):
|
for d in cnt.get('devices', []):
|
||||||
podman_args.extend(['--device', d])
|
podman_args.extend(['--device', d])
|
||||||
for e in env:
|
for e in env:
|
||||||
|
Loading…
Reference in New Issue
Block a user