diff --git a/podman_compose.py b/podman_compose.py index ec6471c8..e5ba8d69 100755 --- a/podman_compose.py +++ b/podman_compose.py @@ -2378,6 +2378,8 @@ async def build_one(compose, args, cnt): build_args.extend(get_secret_args(compose, cnt, secret, podman_is_building=True)) for tag in build_desc.get("tags", []): build_args.extend(["-t", tag]) + for label in build_desc.get("labels", []): + build_args.extend(["--label", label]) for additional_ctx in build_desc.get("additional_contexts", {}): build_args.extend([f"--build-context={additional_ctx}"]) if "target" in build_desc: diff --git a/tests/integration/build/README.md b/tests/integration/build/README.md index e67b4219..b8b260ae 100644 --- a/tests/integration/build/README.md +++ b/tests/integration/build/README.md @@ -21,5 +21,3 @@ ALT buildno=2 port 8000 2019-09-03T15:16:38+0000 as you can see we were able to override buildno to be 2 instead of 1, and httpd_port to 8000. - -NOTE: build labels are not passed to `podman build`