Skip to content

Commit

Permalink
Merge pull request #1009 from bkueng/platform_build_cmd
Browse files Browse the repository at this point in the history
podman_compose.py: support "platform" property in the build command
  • Loading branch information
p12tic committed Jul 26, 2024
2 parents dbbd695 + b3c49df commit 3aa6d4d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions newsfragments/build-platform.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added support for "platform" property in the build command.
2 changes: 2 additions & 0 deletions podman_compose.py
Original file line number Diff line number Diff line change
Expand Up @@ -2375,6 +2375,8 @@ async 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"]]
if "platform" in cnt:
build_args.extend(["--platform", cnt["platform"]])
for secret in build_desc.get("secrets", []):
build_args.extend(get_secret_args(compose, cnt, secret, podman_is_building=True))
for tag in build_desc.get("tags", []):
Expand Down

0 comments on commit 3aa6d4d

Please sign in to comment.