Pass "target" parameter when building an image.

This commit is contained in:
Renee Margaret McConahy 2020-03-23 14:52:17 -04:00 committed by Muayyad Alsadi
parent f9915c47b4
commit 7b40079c06

View File

@ -1067,6 +1067,8 @@ def build_one(compose, args, cnt):
"build", "-t", cnt["image"],
"-f", dockerfile
]
if "target" in build_desc:
build_args.extend(["--target", build_desc.get("target")])
container_to_ulimit_args(cnt, build_args)
if getattr(args, 'pull_always', None): build_args.append("--pull-always")
elif getattr(args, 'pull', None): build_args.append("--pull")