Add support for privileged option

Adds support for the `privileged` option in docker-compose.yml. This has
been supported in docker-compose since 0.4.0, so it seems reasonable to
add support here.

See https://docs.docker.com/compose/compose-file/#domainname-hostname-ipc-mac_address-privileged-read_only-shm_size-stdin_open-tty-user-working_dir
This commit is contained in:
Thomas Coldrick 2019-11-17 07:09:41 +00:00 committed by Muayyad Alsadi
parent e7a9bd3b70
commit 27d3cafb7b

View File

@ -502,6 +502,8 @@ def container_to_args(compose, cnt, detached=True, podman_command='run'):
podman_args.append('-i') podman_args.append('-i')
if cnt.get('tty'): if cnt.get('tty'):
podman_args.append('--tty') podman_args.append('--tty')
if cnt.get('privileged'):
podman_args.append('--privileged')
ulimit = cnt.get('ulimits', []) ulimit = cnt.get('ulimits', [])
if ulimit is not None: if ulimit is not None:
# ulimit can be a single value, i.e. ulimit: host # ulimit can be a single value, i.e. ulimit: host