Support build secrets

Signed-off-by: Excedrin <290525+Excedrin@users.noreply.github.com>
This commit is contained in:
Excedrin 2023-03-14 22:49:39 -07:00 committed by Muayyad Alsadi
parent efe3714266
commit 456370bd46

View File

@ -1931,6 +1931,8 @@ def build_one(compose, args, cnt):
if not os.path.exists(dockerfile):
raise OSError("Dockerfile not found in " + ctx)
build_args = ["-f", dockerfile, "-t", cnt["image"]]
for secret in build_desc.get("secrets", []):
build_args.extend(get_secret_args(compose, cnt, secret))
for tag in build_desc.get("tags", []):
build_args.extend(["-t", tag])
if "target" in build_desc: