mirror of
https://github.com/containers/podman-compose.git
synced 2025-04-24 01:18:54 +02:00
ENH: Added restart policy forwarding to podmann run, compose build args added to up args
This commit is contained in:
parent
e7b1382b1b
commit
047820dbf1
@ -566,6 +566,8 @@ def container_to_args(compose, cnt, detached=True, podman_command='run'):
|
|||||||
podman_args.append('--tty')
|
podman_args.append('--tty')
|
||||||
if cnt.get('privileged', None):
|
if cnt.get('privileged', None):
|
||||||
podman_args.append('--privileged')
|
podman_args.append('--privileged')
|
||||||
|
if cnt.get('restart', None) is not None:
|
||||||
|
podman_args.append(['--restart', cnt['restart']])
|
||||||
container_to_ulimit_args(cnt, podman_args)
|
container_to_ulimit_args(cnt, podman_args)
|
||||||
# currently podman shipped by fedora does not package this
|
# currently podman shipped by fedora does not package this
|
||||||
# if cnt.get('init', None):
|
# if cnt.get('init', None):
|
||||||
@ -1294,7 +1296,8 @@ def compose_up_parse(parser):
|
|||||||
help="Return the exit code of the selected service container. Implies --abort-on-container-exit.")
|
help="Return the exit code of the selected service container. Implies --abort-on-container-exit.")
|
||||||
parser.add_argument('services', metavar='SERVICES', nargs='*',
|
parser.add_argument('services', metavar='SERVICES', nargs='*',
|
||||||
help='service names to start')
|
help='service names to start')
|
||||||
|
# might want to add build-related options to 'up' command as 'up' might evoke build if images not available
|
||||||
|
compose_build_parse(parser)
|
||||||
|
|
||||||
@cmd_parse(podman_compose, 'run')
|
@cmd_parse(podman_compose, 'run')
|
||||||
def compose_run_parse(parser):
|
def compose_run_parse(parser):
|
||||||
|
Loading…
Reference in New Issue
Block a user