19.2. コンテナーでの Skopeo の実行
Skopeo を使用してリモートコンテナーイメージを検査できます。コンテナーで Skopeo を実行すると、コンテナーの root ファイルシステムがホストの root ファイルシステムから分離されることを意味します。ホストとコンテナー間でファイルを共有またはコピーするには、ファイルとディレクトリーをマウントする必要があります。
前提条件
-
container-toolsメタパッケージがインストールされている。
手順
registry.redhat.io レジストリーにログインします。
$ podman login registry.redhat.io Username: myuser@mycompany.com Password: <password> Login Succeeded!registry.redhat.io/rhel10/skopeoコンテナーイメージを取得します。$ podman pull registry.redhat.io/rhel10/skopeoSkopeo を使用して、リモートコンテナーイメージ
registry.access.redhat.com/ubi10/ubiを検査します。$ podman run --rm registry.redhat.io/rhel10/skopeo \ skopeo inspect docker://registry.access.redhat.com/ubi10/ubi { "Name": "registry.access.redhat.com/ubi10/ubi", ... "Labels": { "architecture": "x86_64", ... "name": "ubi10", ... "summary": "Provides the latest release of Red Hat Universal Base Image 10.", "url": "https://access.redhat.com/containers/#/registry.access.redhat.com/ubi10/images/8.2-347", ... }, "Architecture": "amd64", "Os": "linux", "Layers": [ ... ], "Env": [ "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", "container=oci" ] }--rmオプションは、コンテナーの終了後にregistry.redhat.io/rhel10/skopeoイメージを削除します。