From f9915c47b48eee4de2eff945d73cdae9fb28c303 Mon Sep 17 00:00:00 2001 From: Matt Novenstern Date: Mon, 6 Apr 2020 20:14:55 -0400 Subject: [PATCH] Check for target property when building images For multi-stage builds, this allows picking a stage to build up to --- podman_compose.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/podman_compose.py b/podman_compose.py index 896166a..9aefbdd 100755 --- a/podman_compose.py +++ b/podman_compose.py @@ -1074,6 +1074,9 @@ def build_one(compose, args, cnt): for build_arg in args_list + args.build_arg: build_args.extend(("--build-arg", build_arg,)) build_args.append(ctx) + build_target = build_desc.get('target') + if build_target: + build_args.extend(('--target', build_target)) compose.podman.run(build_args, sleep=0) @cmd_run(podman_compose, 'build', 'build stack images')