Add support for --platform

For docker compatibility we need to support --platform
flag.

podman create --platform
podman run --platform
podman pull --platform

Since we have --override-os and --override-arch already
this can be done just by modifying the client to split
the --platform call into os and arch and then pass those
options to the server side.

Fixes: https://github.com/containers/podman/issues/6244

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
Daniel J Walsh
2020-11-25 15:40:46 -05:00
parent 397e9a9f1b
commit 88f8d96ed8
9 changed files with 120 additions and 0 deletions

View File

@ -675,6 +675,11 @@ The efault is to create a private PID namespace for the container.
Tune the container's pids limit. Set to **0** to have unlimited pids for the container. The default is **4096** on systems that support "pids" cgroup controller.
#### **--platform**=*OS/ARCH*
Specify the platform for selecting the image. (Conflicts with override-arch and override-os)
The `--platform` option can be used to override the current architecture and operating system.
#### **--pod**=*name*
Run container in an existing pod. If you want Podman to make the pod for you, prefix the pod name with **new:**.