Image Registry - Multi-Architecture Image (build)

Image Registry では、`Image Manifest V 2, Schema 2` から `Multi-Architecture Image` の使用が可能になりました。これによって、単一の Image Repository で複数 Architecture Image を扱う事ができます。

ここでは、Red Hat Enterprise Linux 8 (RHEL8) 環境で `buildah` (ビルダー）を使用した `Multi-Architecture Image` の作成方法をご紹介します。
__Buildah__
https://buildah.io/

なお、OpenShift Container Platform (OCP) でも、`buildah` を使用した Container Image のビルドが可能です。
__Custom image builds with Buildah__
https://docs.openshift.com/container-platform/4.10/cicd/builds/custom-builds-buildah.html

#### buildah の導入
`buildah` は `yum` で導入できます。
```shell
$ yum info buildah
Name         : buildah
Epoch        : 1
Version      : 1.24.2
Release      : 4.module+el8.6.0+14877+f643d2d6
Architecture : x86_64
Size         : 30 M
Source       : buildah-1.24.2-4.module+el8.6.0+14877+f643d2d6.src.rpm
Repository   : @System
From repo    : rhel-8-for-x86_64-appstream-rpms
Summary      : A command line tool used for creating OCI Images
URL          : https://buildah.io
License      : ASL 2.0
Description  : The buildah package provides a command line tool which can be used to
             : * create a working container from scratch
             : or
             : * create a working container from an image as a starting point
             : * mount/umount a working container's root file system for manipulation
             : * save container's root file system layer to create a new image
             : * delete a working container or an image
```
ここでは、以下のバージョンを使用します。
```shell
$ buildah version
Version:         1.24.2
Go Version:      go1.17.7
Image Spec:      1.0.2-dev
Runtime Spec:    1.0.2-dev
CNI Spec:        1.0.0
libcni Version:  v1.0.1
image Version:   5.19.2
Git Commit:
Built:           Tue Apr 19 19:20:38 2022
OS/Arch:         linux/amd64
BuildPlatform:   linux/amd64
```
#### Build の準備
以下の Dockerfile と ENTRYPOINT に指定する start.sh を使用します。
```shell
$ ls -l
total 8
-rwxr-xr-x 1 root root 122 Jul  5 14:20 Dockerfile
-rwxr-xr-x 1 root root 114 Jul  5 12:57 start.sh

$ cat Dockerfile
FROM --platform=linux/amd64 docker.io/library/alpine:3.15
ADD start.sh /usr/bin
RUN chmod a+x /usr/bin/start.sh
ENTRYPOINT ["/usr/bin/start.sh"]

$ cat start.sh
#!/bin/sh

while true
do
        echo "[$(date)] : $(basename $0) is running ..."
        sleep 10
done
```
念のため、`podman build` で Container Image を作成して稼働確認をしてみます。
```shell
$ podman build --tag podman-build-test:1.0 .
STEP 1/4: FROM docker.io/library/alpine:3.15
Trying to pull docker.io/library/alpine:3.15...
Getting image source signatures
Copying blob df9b9388f04a done
Copying config 0ac33e5f5a done
Writing manifest to image destination
Storing signatures
STEP 2/4: ADD start.sh /usr/bin
--> e57f371a0f8
STEP 3/4: RUN chmod a+x /usr/bin/start.sh
--> e686a28a36c
STEP 4/4: ENTRYPOINT ["/usr/bin/start.sh"]
COMMIT podman-build-test:1.0
--> ed1ef70e52c
Successfully tagged localhost/podman-build-test:1.0
ed1ef70e52c4e0ad0a2a755b4b522a3ff3353e55e3d37c4687f29e87d3e60169

$ podman image ls
REPOSITORY                   TAG         IMAGE ID      CREATED        SIZE
localhost/podman-build-test  1.0         ed1ef70e52c4  4 seconds ago  5.86 MB
docker.io/library/alpine     3.15        0ac33e5f5afa  3 months ago   5.86 MB

$ podman run --rm -ti localhost/podman-build-test:1.0
[Tue Jul  5 05:32:06 UTC 2022] : start.sh is running ...
[Tue Jul  5 05:32:16 UTC 2022] : start.sh is running ...
^C$
```

#### Multi-Architecture Image の作成
##### Image Manifest の作成
`buildah manifest create` コマンドで Image Manifest を作成します。
※ 事前に作成せずに `buildah build` コマンドで作成することもできます。
```shell
$ buildah manifest create buildah-test:1.0
0e17508509dfdad840e90ba4a71b5c2154f96198a1e2a87999af9c54663d9ddd

$ podman image ls
REPOSITORY              TAG         IMAGE ID      CREATED        SIZE
localhost/buildah-test  1.0         0e17508509df  5 seconds ago  110 B

$ podman manifest inspect 0e17508509df
{
    "schemaVersion": 2,
    "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
    "manifests": null
}
```

作成された Manifest は `fat manifest（別称 Manifest List）` であることが分かります。
__Image Registry - Multi-Architecture Image (inspect / pull)__
https://qiita.com/qiita2021user/items/515dae5612dedbffde4a

また、この Manifest List には Container Image が紐づいていないことが分かります。
```shell
$ podman image inspect 0e17508509df
[]
Error: error inspecting object: no image found in manifest list for architecture amd64, variant "", OS linux: image not known
```

##### Container Image のビルド
`buildah build` コマンドで Container Image をビルドします。
`--all-platforms` オプションで Base Image の Inspect により全ての Architecture Image をビルドします。
または `--platform` オプションを使用して特定 Architecture Image をビルドします。`--platform` には複数 Architecture の指定が可能であることから `docker.io/library/alpine:3.15` が実装する Architecture を指定してみます。

```shell
$ oc image info docker.io/library/alpine:3.15
error: the image is a manifest list and contains multiple images - use --filter-by-os to select from:

  OS             DIGEST
  linux/amd64    sha256:a777c9c66ba177ccfea23f2a216ff6721e78a662cd17019488c417135299cd89
  linux/arm/v6   sha256:70dc0b1a6029d999b9bba6b9d8793e077a16c938f5883397944f3bd01f8cd48a
  linux/arm/v7   sha256:dc18010aabc13ce121123c7bb0f4dcb6879ce22b4f7c65669a2c634b5ceecafb
  linux/arm64/v8 sha256:f3bec467166fd0e38f83ff32fb82447f5e89b5abd13264a04454c75e11f1cdc6
  linux/386      sha256:51103b3f2993cbc1b45ff9d941b5d461484002792e02aa29580ec5282de719d4
  linux/ppc64le  sha256:09addbcf0db5a11803f29bddbdbfd31adce7e40d68750359f9a4eb4dcc54078f
  linux/s390x    sha256:0a6a2a45b31cd5e28a366a035185eb75020ec28866957c2cb82422ff68fae065

$ ARCH=$(oc image info docker.io/library/alpine:3.15 2>&1 | grep "linux/" | awk '{print $1}' | sed -ze 's/\n/,/g' -e 's/,$//g')
```

`buildah build --platform` に `ARCH` 変数で複数 Architecture を指定してビルドします。
```shell
$ echo $ARCH
linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/386,linux/ppc64le,linux/s390x

$ buildah build --platform $ARCH --manifest localhost/buildah-test:1.0 .
[linux/amd64] STEP 1/4: FROM docker.io/library/alpine:3.15
Trying to pull docker.io/library/alpine:3.15...
Getting image source signatures
Copying blob df9b9388f04a done
Copying config 0ac33e5f5a done
Writing manifest to image destination
Storing signatures
[linux/amd64] STEP 2/4: ADD start.sh /usr/bin
[linux/amd64] STEP 3/4: RUN chmod a+x /usr/bin/start.sh
[linux/amd64] STEP 4/4: ENTRYPOINT ["/usr/bin/start.sh"]
[linux/amd64] COMMIT
Getting image source signatures
Copying blob 4fc242d58285 skipped: already exists
Copying blob 1856f948c4bf done
Copying config 0bc3e2b24a done
Writing manifest to image destination
Storing signatures
--> 0bc3e2b24ac
[linux/s390x] STEP 1/4: FROM docker.io/library/alpine:3.15
0bc3e2b24ac7e76f1fa58f4ad60d41ec596f4188dbe0b0b1f9faa4df16205dec
[linux/s390x] STEP 2/4: ADD start.sh /usr/bin
[linux/s390x] STEP 3/4: RUN chmod a+x /usr/bin/start.sh
[linux/s390x] STEP 4/4: ENTRYPOINT ["/usr/bin/start.sh"]
[linux/s390x] COMMIT
Getting image source signatures
Copying blob 4fc242d58285 skipped: already exists
Copying blob b9a243c34cc6 done
Copying config bd2d524da3 done
Writing manifest to image destination
Storing signatures
--> bd2d524da38
[linux/arm/v6] STEP 1/4: FROM docker.io/library/alpine:3.15
bd2d524da383c2ed059598d00a6055b9b45e619c580500fdc9665296ae54a673
[linux/arm/v6] STEP 2/4: ADD start.sh /usr/bin
[linux/arm/v6] STEP 3/4: RUN chmod a+x /usr/bin/start.sh
[linux/arm/v6] STEP 4/4: ENTRYPOINT ["/usr/bin/start.sh"]
[linux/arm/v6] COMMIT
Getting image source signatures
Copying blob 4fc242d58285 skipped: already exists
Copying blob 2242870f94ee done
Copying config ef8bf7982a done
Writing manifest to image destination
Storing signatures
--> ef8bf7982aa
[linux/arm/v7] STEP 1/4: FROM docker.io/library/alpine:3.15
ef8bf7982aacba6f61a4a9731b0528f2c96fff941b054ce100394b0b20161cb1
[linux/arm/v7] STEP 2/4: ADD start.sh /usr/bin
[linux/arm/v7] STEP 3/4: RUN chmod a+x /usr/bin/start.sh
[linux/arm/v7] STEP 4/4: ENTRYPOINT ["/usr/bin/start.sh"]
[linux/arm/v7] COMMIT
Getting image source signatures
Copying blob 4fc242d58285 skipped: already exists
Copying blob 116ebe7e0830 done
Copying config c3d510a1d5 done
Writing manifest to image destination
Storing signatures
--> c3d510a1d55
[linux/arm64] STEP 1/4: FROM docker.io/library/alpine:3.15
c3d510a1d55280f7f6ade019adcb6a251b5181e1c5a955fcd587fbf524f58f28
[linux/arm64] STEP 2/4: ADD start.sh /usr/bin
[linux/arm64] STEP 3/4: RUN chmod a+x /usr/bin/start.sh
[linux/arm64] STEP 4/4: ENTRYPOINT ["/usr/bin/start.sh"]
[linux/arm64] COMMIT
Getting image source signatures
Copying blob 4fc242d58285 skipped: already exists
Copying blob 9b3308c1e38e done
Copying config e4a11a4a27 done
Writing manifest to image destination
Storing signatures
--> e4a11a4a273
[linux/386] STEP 1/4: FROM docker.io/library/alpine:3.15
e4a11a4a273e98dc6f1bc851ba814e671db9f1d79d326091ff8df53661a2d97e
[linux/386] STEP 2/4: ADD start.sh /usr/bin
[linux/386] STEP 3/4: RUN chmod a+x /usr/bin/start.sh
[linux/386] STEP 4/4: ENTRYPOINT ["/usr/bin/start.sh"]
[linux/386] COMMIT
Getting image source signatures
Copying blob 4fc242d58285 skipped: already exists
Copying blob 04665ad84dbc done
Copying config 75b399a473 done
Writing manifest to image destination
Storing signatures
--> 75b399a4731
[linux/ppc64le] STEP 1/4: FROM docker.io/library/alpine:3.15
75b399a47312318068583b9869318cb87e1c5abcf992596edf19cf39df622970
[linux/ppc64le] STEP 2/4: ADD start.sh /usr/bin
[linux/ppc64le] STEP 3/4: RUN chmod a+x /usr/bin/start.sh
[linux/ppc64le] STEP 4/4: ENTRYPOINT ["/usr/bin/start.sh"]
[linux/ppc64le] COMMIT
Getting image source signatures
Copying blob 4fc242d58285 skipped: already exists
Copying blob 5dec57fd26af done
Copying config 7bbb615802 done
Writing manifest to image destination
Storing signatures
--> 7bbb6158020
7bbb6158020b937abfaaae3ee6ae598cf2e32f69f62ec35bcd9dd5bbd8036692

$ podman image ls
REPOSITORY                TAG         IMAGE ID      CREATED         SIZE
<none>                    <none>      7bbb6158020b  9 seconds ago   5.86 MB
<none>                    <none>      75b399a47312  11 seconds ago  5.86 MB
<none>                    <none>      e4a11a4a273e  13 seconds ago  5.86 MB
<none>                    <none>      c3d510a1d552  15 seconds ago  5.86 MB
<none>                    <none>      ef8bf7982aac  17 seconds ago  5.86 MB
<none>                    <none>      bd2d524da383  19 seconds ago  5.86 MB
<none>                    <none>      0bc3e2b24ac7  21 seconds ago  5.86 MB
localhost/buildah-test    1.0         0e17508509df  14 minutes ago  3.4 kB
docker.io/library/alpine  3.15        0ac33e5f5afa  3 months ago    5.86 MB
```
なお、`--jobs` オプションを指定することで、並行処理を行うこともできます。
例えば、`--platform` で指定した Architecture 数分の並行処理を行う場合は以下のように指定できます。
```shell
$ echo $ARCH | awk -F "," '{print NF}'
7

$ buildah build --jobs $(echo $ARCH | awk -F "," '{print NF}') --platform $ARCH --manifest localhost/buildah-test:1.0 .
```
##### 実行結果の確認
`buildah build` コマンド実行後の Manifet List は以下のように更新されます。
```shell
$ podman manifest inspect 0e17508509df
{
    "schemaVersion": 2,
    "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
    "manifests": [
        {
            "mediaType": "application/vnd.oci.image.manifest.v1+json",
            "size": 749,
            "digest": "sha256:1def9f292fe6c71942019875c56dded13fc467f8094176bfc24f3a4e6a19402c",
            "platform": {
                "architecture": "amd64",
                "os": "linux"
            }
        },
        {
            "mediaType": "application/vnd.oci.image.manifest.v1+json",
            "size": 749,
            "digest": "sha256:ac8f1f8fb9169c403633c8caeeed882d6b92a6b4250514e1db8201145815ddaf",
            "platform": {
                "architecture": "s390x",
                "os": "linux"
            }
        },
        {
            "mediaType": "application/vnd.oci.image.manifest.v1+json",
            "size": 749,
            "digest": "sha256:9b71ab565a7beed5ba7d5b11ecac66c158bfa6cf95ee6f70cb150a380a93d90d",
            "platform": {
                "architecture": "arm",
                "os": "linux",
                "variant": "v6"
            }
        },
        {
            "mediaType": "application/vnd.oci.image.manifest.v1+json",
            "size": 749,
            "digest": "sha256:70093b577d1be1ed69566e652c21ae06c6411844d855c92e669ba2729d10a48e",
            "platform": {
                "architecture": "arm",
                "os": "linux",
                "variant": "v7"
            }
        },
        {
            "mediaType": "application/vnd.oci.image.manifest.v1+json",
            "size": 749,
            "digest": "sha256:d5b46aadbf0a670f18c147ff064ed1d1a8bebad4b5fc07bb6ac63fd35157ec62",
            "platform": {
                "architecture": "arm64",
                "os": "linux"
            }
        },
        {
            "mediaType": "application/vnd.oci.image.manifest.v1+json",
            "size": 749,
            "digest": "sha256:f8e04bb902f5030962499b25615419f9b63d497cf1ad7a3cf7af0b672742b058",
            "platform": {
                "architecture": "386",
                "os": "linux"
            }
        },
        {
            "mediaType": "application/vnd.oci.image.manifest.v1+json",
            "size": 749,
            "digest": "sha256:85e206c5a2c071bed43a5caad263cbee58a0bd1a3a49203b00cda229a45abc59",
            "platform": {
                "architecture": "ppc64le",
                "os": "linux"
            }
        }
    ]
}
```
また、Manifest List に Container Image が紐づけられます。
```shell
$ podman image inspect 0e17508509df
[
     {
          "Id": "0bc3e2b24ac7e76f1fa58f4ad60d41ec596f4188dbe0b0b1f9faa4df16205dec",
          "Digest": "sha256:1def9f292fe6c71942019875c56dded13fc467f8094176bfc24f3a4e6a19402c",
          "RepoTags": [],
          "RepoDigests": [],
          "Parent": "",
          "Comment": "",
          "Created": "2022-07-05T06:04:30.8304086Z",
          "Config": {
               "Env": [
                    "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
               ],
               "Entrypoint": [
                    "/usr/bin/start.sh"
               ],
               "Labels": {
                    "io.buildah.version": "1.24.2"
               }
          },
          "Version": "",
          "Author": "",
          "Architecture": "amd64",
          "Os": "linux",
          "Size": 5862003,
          "VirtualSize": 5862003,
          "GraphDriver": {
               "Name": "overlay",
               "Data": {
                    "LowerDir": "/var/lib/containers/storage/overlay/4fc242d58285699eca05db3cc7c7122a2b8e014d9481f323bd9277baacfa0628/diff",
                    "UpperDir": "/var/lib/containers/storage/overlay/03a764c09dcd6d27dcd7e4df2f836c49654df70a82873923a63d717d0a1afc87/diff",
                    "WorkDir": "/var/lib/containers/storage/overlay/03a764c09dcd6d27dcd7e4df2f836c49654df70a82873923a63d717d0a1afc87/work"
               }
          },
          "RootFS": {
               "Type": "layers",
               "Layers": [
                    "sha256:4fc242d58285699eca05db3cc7c7122a2b8e014d9481f323bd9277baacfa0628",
                    "sha256:1856f948c4bf972825d5ebc9ddbb3d6ccbd2c1d2a890bbf1cda21cfd13803116"
               ]
          },
          "Labels": {
               "io.buildah.version": "1.24.2"
          },
          "Annotations": {
               "org.opencontainers.image.base.digest": "sha256:a777c9c66ba177ccfea23f2a216ff6721e78a662cd17019488c417135299cd89",
               "org.opencontainers.image.base.name": "docker.io/library/alpine:3.15"
          },
          "ManifestType": "application/vnd.oci.image.manifest.v1+json",
          "User": "",
          "History": [
               {
                    "created": "2022-04-05T00:19:59.790636867Z",
                    "created_by": "/bin/sh -c #(nop) ADD file:5d673d25da3a14ce1f6cf66e4c7fd4f4b85a3759a9d93efb3fd9ff852b5b56e4 in / "
               },
               {
                    "created": "2022-04-05T00:19:59.912662499Z",
                    "created_by": "/bin/sh -c #(nop)  CMD [\"/bin/sh\"]",
                    "empty_layer": true
               },
               {
                    "created": "2022-07-05T06:04:30.400728016Z",
                    "created_by": "/bin/sh -c #(nop) ADD file:29224fab6275fcbcfeb9e59d018598d1ced47483889d97bc4ed12e8a41c8184f in /usr/bin ",
                    "empty_layer": true
               },
               {
                    "created": "2022-07-05T06:04:30.829747547Z",
                    "created_by": "/bin/sh -c chmod a+x /usr/bin/start.sh",
                    "empty_layer": true
               },
               {
                    "created": "2022-07-05T06:04:31.000808315Z",
                    "created_by": "/bin/sh -c #(nop) ENTRYPOINT [\"/usr/bin/start.sh\"]",
                    "comment": "FROM docker.io/library/alpine:3.15"
               }
          ],
          "NamesHistory": [
               "docker.io/library/e7a6741ec9673297a673e05f166b8c188576996b09e804d68d6a9ba8c54652e5-tmp:latest"
          ]
     }
]
```
Manifest List 中の Image Digest と Platform の情報を確認してみます。
```shell
$ podman manifest inspect 0e17508509df | jq -rc '.manifests[] | [.digest, .platform]'
["sha256:1def9f292fe6c71942019875c56dded13fc467f8094176bfc24f3a4e6a19402c",{"architecture":"amd64","os":"linux"}]
["sha256:ac8f1f8fb9169c403633c8caeeed882d6b92a6b4250514e1db8201145815ddaf",{"architecture":"s390x","os":"linux"}]
["sha256:9b71ab565a7beed5ba7d5b11ecac66c158bfa6cf95ee6f70cb150a380a93d90d",{"architecture":"arm","os":"linux","variant":"v6"}]
["sha256:70093b577d1be1ed69566e652c21ae06c6411844d855c92e669ba2729d10a48e",{"architecture":"arm","os":"linux","variant":"v7"}]
["sha256:d5b46aadbf0a670f18c147ff064ed1d1a8bebad4b5fc07bb6ac63fd35157ec62",{"architecture":"arm64","os":"linux"}]
["sha256:f8e04bb902f5030962499b25615419f9b63d497cf1ad7a3cf7af0b672742b058",{"architecture":"386","os":"linux"}]
["sha256:85e206c5a2c071bed43a5caad263cbee58a0bd1a3a49203b00cda229a45abc59",{"architecture":"ppc64le","os":"linux"}]
```
`podman image ls` の出力と合わせると、Manifest と Container Image の対応が確認できます。
```shell
$ podman image ls
REPOSITORY                TAG         IMAGE ID      CREATED         SIZE
<none>                    <none>      7bbb6158020b  11 minutes ago  5.86 MB
<none>                    <none>      75b399a47312  11 minutes ago  5.86 MB
<none>                    <none>      e4a11a4a273e  11 minutes ago  5.86 MB
<none>                    <none>      c3d510a1d552  11 minutes ago  5.86 MB
<none>                    <none>      ef8bf7982aac  11 minutes ago  5.86 MB
<none>                    <none>      bd2d524da383  11 minutes ago  5.86 MB
<none>                    <none>      0bc3e2b24ac7  11 minutes ago  5.86 MB
localhost/buildah-test    1.0         0e17508509df  25 minutes ago  3.4 kB
docker.io/library/alpine  3.15        0ac33e5f5afa  3 months ago    5.86 MB

$ for I in $(podman image ls --format {{.ID}})
do
  echo -n "$I : "
  podman inspect $I | jq -rc '.[] |[.RepoTags, .Digest, .Architecture, .Os]'
done
7bbb6158020b : [[],"sha256:85e206c5a2c071bed43a5caad263cbee58a0bd1a3a49203b00cda229a45abc59","ppc64le","linux"]
75b399a47312 : [[],"sha256:f8e04bb902f5030962499b25615419f9b63d497cf1ad7a3cf7af0b672742b058","386","linux"]
e4a11a4a273e : [[],"sha256:d5b46aadbf0a670f18c147ff064ed1d1a8bebad4b5fc07bb6ac63fd35157ec62","arm64","linux"]
c3d510a1d552 : [[],"sha256:70093b577d1be1ed69566e652c21ae06c6411844d855c92e669ba2729d10a48e","arm","linux"]
ef8bf7982aac : [[],"sha256:9b71ab565a7beed5ba7d5b11ecac66c158bfa6cf95ee6f70cb150a380a93d90d","arm","linux"]
bd2d524da383 : [[],"sha256:ac8f1f8fb9169c403633c8caeeed882d6b92a6b4250514e1db8201145815ddaf","s390x","linux"]
0bc3e2b24ac7 : [[],"sha256:1def9f292fe6c71942019875c56dded13fc467f8094176bfc24f3a4e6a19402c","amd64","linux"]
0e17508509df : [[],"sha256:1def9f292fe6c71942019875c56dded13fc467f8094176bfc24f3a4e6a19402c","amd64","linux"]
0ac33e5f5afa : [["docker.io/library/alpine:3.15"],"sha256:4edbd2beb5f78b1014028f4fbb99f3237d9561100b6881aabbf5acce2c4f9454","amd64","linux"]
```

例えば `linux/ppc64le` に対応する Manifest と Container Image は以下になります。
```shell
$ podman manifest inspect 0e17508509df | jq -r '.manifests[] | select(.platform.architecture == "ppc64le" and .platform.os == "linux") | .digest'
sha256:85e206c5a2c071bed43a5caad263cbee58a0bd1a3a49203b00cda229a45abc59

$ for I in $(podman image ls --format {{.ID}})
do
  echo -n "$I : "
  podman inspect $I | jq -rc '.[] |[.RepoTags, .Digest, .Architecture, .Os]'
done | grep sha256:85e206c5a2c071bed43a5caad263cbee58a0bd1a3a49203b00cda229a45abc59
7bbb6158020b : [[],"sha256:85e206c5a2c071bed43a5caad263cbee58a0bd1a3a49203b00cda229a45abc59","ppc64le","linux"]

$ podman image inspect 7bbb6158020b
[
     {
          "Id": "7bbb6158020b937abfaaae3ee6ae598cf2e32f69f62ec35bcd9dd5bbd8036692",
          "Digest": "sha256:85e206c5a2c071bed43a5caad263cbee58a0bd1a3a49203b00cda229a45abc59",
          "RepoTags": [],
          "RepoDigests": [],
          "Parent": "",
          "Comment": "",
          "Created": "2022-07-05T06:04:42.860846229Z",
          "Config": {
               "Env": [
                    "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
               ],
               "Entrypoint": [
                    "/usr/bin/start.sh"
               ],
               "Labels": {
                    "io.buildah.version": "1.24.2"
               }
          },
          "Version": "",
          "Author": "",
          "Architecture": "ppc64le",
          "Os": "linux",
          "Size": 5862007,
          "VirtualSize": 5862007,
          "GraphDriver": {
               "Name": "overlay",
               "Data": {
                    "LowerDir": "/var/lib/containers/storage/overlay/4fc242d58285699eca05db3cc7c7122a2b8e014d9481f323bd9277baacfa0628/diff",
                    "UpperDir": "/var/lib/containers/storage/overlay/11005105e4a5824a83728f092c53883f70b72200d95959a54aff8b4528cd62a1/diff",
                    "WorkDir": "/var/lib/containers/storage/overlay/11005105e4a5824a83728f092c53883f70b72200d95959a54aff8b4528cd62a1/work"
               }
          },
          "RootFS": {
               "Type": "layers",
               "Layers": [
                    "sha256:4fc242d58285699eca05db3cc7c7122a2b8e014d9481f323bd9277baacfa0628",
                    "sha256:5dec57fd26aff53e004539222dcf85228596e7d8200f24345395e1887c293c31"
               ]
          },
          "Labels": {
               "io.buildah.version": "1.24.2"
          },
          "Annotations": {
               "org.opencontainers.image.base.digest": "sha256:a777c9c66ba177ccfea23f2a216ff6721e78a662cd17019488c417135299cd89",
               "org.opencontainers.image.base.name": "docker.io/library/alpine:3.15"
          },
          "ManifestType": "application/vnd.oci.image.manifest.v1+json",
          "User": "",
          "History": [
               {
                    "created": "2022-04-05T00:19:59.790636867Z",
                    "created_by": "/bin/sh -c #(nop) ADD file:5d673d25da3a14ce1f6cf66e4c7fd4f4b85a3759a9d93efb3fd9ff852b5b56e4 in / "
               },
               {
                    "created": "2022-04-05T00:19:59.912662499Z",
                    "created_by": "/bin/sh -c #(nop)  CMD [\"/bin/sh\"]",
                    "empty_layer": true
               },
               {
                    "created": "2022-07-05T06:04:42.441732471Z",
                    "created_by": "/bin/sh -c #(nop) ADD file:29224fab6275fcbcfeb9e59d018598d1ced47483889d97bc4ed12e8a41c8184f in /usr/bin ",
                    "empty_layer": true
               },
               {
                    "created": "2022-07-05T06:04:42.860455267Z",
                    "created_by": "/bin/sh -c chmod a+x /usr/bin/start.sh",
                    "empty_layer": true
               },
               {
                    "created": "2022-07-05T06:04:43.000727097Z",
                    "created_by": "/bin/sh -c #(nop) ENTRYPOINT [\"/usr/bin/start.sh\"]",
                    "comment": "FROM docker.io/library/alpine:3.15"
               }
          ],
          "NamesHistory": [
               "docker.io/library/e4447283666488de85e9ad2610dcc7894da3799a15a9ed3effeebf327dba43ce-tmp:latest"
          ]
     }
]
```