mirror of
https://github.com/containers/podman-compose.git
synced 2024-11-21 23:43:24 +01:00
podman_compose.py: support "platform" property in the build command
This was already added to container_to_args() in https://github.com/containers/podman-compose/pull/470 which is used for the 'up' and 'run' commands. Definition in the schema: https://github.com/compose-spec/compose-spec/blob/main/schema/compose-spec.json#L329 Signed-off-by: Beat Küng <beat-kueng@gmx.net>
This commit is contained in:
parent
dbbd695463
commit
b3c49df6eb
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