Support platform property

As per https://github.com/compose-spec/compose-spec/blob/master/spec.md#platform

Example:

```
services:
  mysql:
    image: mysql:5.7
    platform: linux/x86_64
```

Signed-off-by: Shane Smith <shane.smith@shopify.com>
This commit is contained in:
Shane Smith 2022-04-06 12:10:52 -04:00 committed by Muayyad Alsadi
parent fc3598faf2
commit 6be661f6da

View File

@ -904,6 +904,9 @@ def container_to_args(compose, cnt, detached=True):
if is_str(entrypoint):
entrypoint = shlex.split(entrypoint)
podman_args.extend(["--entrypoint", json.dumps(entrypoint)])
platform = cnt.get("platform", None)
if platform is not None:
podman_args.extend(["--platform", platform])
# WIP: healthchecks are still work in progress
healthcheck = cnt.get("healthcheck", None) or {}