diff --git a/newsfragments/build-platform.feature b/newsfragments/build-platform.feature new file mode 100644 index 00000000..d19de680 --- /dev/null +++ b/newsfragments/build-platform.feature @@ -0,0 +1 @@ +Added support for "platform" property in the build command. diff --git a/podman_compose.py b/podman_compose.py index 35c4aa59..a324e137 100755 --- a/podman_compose.py +++ b/podman_compose.py @@ -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", []):