Skip to content

Commit 3aa6d4d

Browse files
authored
Merge pull request #1009 from bkueng/platform_build_cmd
podman_compose.py: support "platform" property in the build command
2 parents dbbd695 + b3c49df commit 3aa6d4d

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

newsfragments/build-platform.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Added support for "platform" property in the build command.

podman_compose.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2375,6 +2375,8 @@ async def build_one(compose, args, cnt):
23752375
if not os.path.exists(dockerfile):
23762376
raise OSError("Dockerfile not found in " + ctx)
23772377
build_args = ["-f", dockerfile, "-t", cnt["image"]]
2378+
if "platform" in cnt:
2379+
build_args.extend(["--platform", cnt["platform"]])
23782380
for secret in build_desc.get("secrets", []):
23792381
build_args.extend(get_secret_args(compose, cnt, secret, podman_is_building=True))
23802382
for tag in build_desc.get("tags", []):

0 commit comments

Comments
 (0)