mirror of
https://github.com/containers/podman-compose.git
synced 2025-04-11 02:59:36 +02:00
Merge pull request #1009 from bkueng/platform_build_cmd
podman_compose.py: support "platform" property in the build command
This commit is contained in:
commit
3aa6d4d158
1
newsfragments/build-platform.feature
Normal file
1
newsfragments/build-platform.feature
Normal file
@ -0,0 +1 @@
|
||||
Added support for "platform" property in the build command.
|
@ -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", []):
|
||||
|
Loading…
Reference in New Issue
Block a user