Skip to content

Commit

Permalink
Check for target property when building images
Browse files Browse the repository at this point in the history
For multi-stage builds, this allows picking a stage to build up to
  • Loading branch information
fisxoj authored and muayyad-alsadi committed Apr 22, 2020
1 parent 1973340 commit f9915c4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions podman_compose.py
Expand Up @@ -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')
Expand Down

0 comments on commit f9915c4

Please sign in to comment.