Merge pull request #1009 from bkueng/platform_build_cmd

podman_compose.py: support "platform" property in the build command
This commit is contained in:
Povilas Kanapickas 2024-07-27 00:04:54 +03:00 committed by GitHub
commit 3aa6d4d158
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 0 deletions

View File

@ -0,0 +1 @@
Added support for "platform" property in the build command.

View File

@ -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", []):