5.3.3. プライベートレジストリーの準備

前提条件

  • oc ツールが利用できる。
  • skopeo ツール(バージョン 0.1.40 以降)が利用できる。
  • podman ツールが利用できる。
  • OpenShift クラスターからアクセスできるイメージ、および V2 イメージマニフェスト (スキーマバージョン 2) フォーマットのサポート。インターネットへのアクセスが一時的に可能な場所から、これにプッシュできることを確認します。

表5.1 サンプルで使用されるプレースホルダー

<source-image>

レジストリー、組織、およびダイジェストなどのソースイメージの詳細な組み合わせ (coordinate)。

<target-registry>

ターゲットコンテナーイメージレジストリーのホスト名およびポート。

<target-organization>

ターゲットのコンテナーイメージレジストリー内の組織

<target-image>

ターゲットのコンテナーイメージレジストリーのイメージ名とダイジェスト。

<target-user>

ターゲットのコンテナーイメージレジストリーのユーザー名。

<target-password>

ターゲットのコンテナーイメージレジストリーのユーザーパスワード。

手順

  1. 内部イメージレジストリーにログインします。

    $ podman login --username <user> --password <password> <target-registry>
    注記

    内部レジストリーへのプッシュを試行する際に x509: certificate signed by unknown authority などのエラーが発生した場合には、以下のいずれかの回避策を試してください。

    • OpenShift クラスターの証明書を /etc/containers/certs.d/<target-registry>に追加します。
    • /etc/containers/registries.conf にある Podman 設定ファイルに以下の行を追加して、レジストリーを非セキュアなレジストリーとして追加する。
    [registries.insecure]
    registries = ['<target-registry>']
  2. ダイジェストを変更せずにイメージをコピーします。以下の表のすべてのイメージに対して、この手順を繰り返します。

    $ skopeo copy --all docker://<source-image> docker://<target-registry>/<target-organization>/<target-image>
    注記

    表5.2 名前に含まれるプレフィックスまたはキーワードからの container-images の使用について

    使用プレフィックスまたはキーワード

    Essential

    stacks-, plugin- または -openj9- ではない

    Workspaces

    stacks-, plugin-

    IBM Z および IBM Power Systems

    -openj9-

    注記

    openj9 のサフィックスがつくイメージは、x86_64 で使用される OpenJDK イメージと同等の Eclipse OpenJ9 イメージです。IBM Power Systems および IBM Z は、IBM Semeru の Eclipse OpenJ9 を使用して、これらのシステムのパフォーマンスを強化します。IBM Semeru Runtimes を参照してください。

    表5.3 プライベートレジストリーでコピーするイメージ

    <source-image><target-image>

    registry.redhat.io/codeready-workspaces/backup-rhel8@sha256:86fa48f4bd48a9d3de78ea1a1c96c5e5f5d9fa614da021a06c735da8dfdf06a2

    backup-rhel8@sha256:86fa48f4bd48a9d3de78ea1a1c96c5e5f5d9fa614da021a06c735da8dfdf06a2

    registry.redhat.io/codeready-workspaces/configbump-rhel8@sha256:04eeff2c4767a267759d87a34032d6ff8f283e23b323b33a39a3ae4304d259aa

    configbump-rhel8@sha256:04eeff2c4767a267759d87a34032d6ff8f283e23b323b33a39a3ae4304d259aa

    registry.redhat.io/codeready-workspaces/crw-2-rhel8-operator@sha256:415dad894e8268c1c9836599b95eff87da5b87ff032d040fc0301d9e0daba30d

    crw-2-rhel8-operator@sha256:415dad894e8268c1c9836599b95eff87da5b87ff032d040fc0301d9e0daba30d

    registry.redhat.io/codeready-workspaces/dashboard-rhel8@sha256:20c11bfa817a94b000b886a5fbe88de304db1e263c00e97a8fe183357870c1aa

    dashboard-rhel8@sha256:20c11bfa817a94b000b886a5fbe88de304db1e263c00e97a8fe183357870c1aa

    registry.redhat.io/codeready-workspaces/devfileregistry-rhel8@sha256:95bb0ad3a8db800f7aff6e4049a1f1bfa1c705ebecca4ae2c9d1c5bf28d19052

    devfileregistry-rhel8@sha256:95bb0ad3a8db800f7aff6e4049a1f1bfa1c705ebecca4ae2c9d1c5bf28d19052

    registry.redhat.io/codeready-workspaces/jwtproxy-rhel8@sha256:53ba026ac971bc228b73f70880f0eec9971d683b7b4e17f841eee9ca3f2a4421

    jwtproxy-rhel8@sha256:53ba026ac971bc228b73f70880f0eec9971d683b7b4e17f841eee9ca3f2a4421

    registry.redhat.io/codeready-workspaces/machineexec-rhel8@sha256:3d453b099d33f8024e2f5a7b0ed312bebe5f9cc74d4e27b0e1b70d94aa8605d7

    machineexec-rhel8@sha256:3d453b099d33f8024e2f5a7b0ed312bebe5f9cc74d4e27b0e1b70d94aa8605d7

    registry.redhat.io/codeready-workspaces/plugin-java11-openj9-rhel8@sha256:90b7403f9833e393759bde7df0544518bb141ce7c0072217194b953a8d4b4f82

    plugin-java11-openj9-rhel8@sha256:90b7403f9833e393759bde7df0544518bb141ce7c0072217194b953a8d4b4f82

    registry.redhat.io/codeready-workspaces/plugin-java11-rhel8@sha256:eba0875477a9a116cf0e2697048cb586c9b32e90cf21ff4b3dfd70fab77c5fd0

    plugin-java11-rhel8@sha256:eba0875477a9a116cf0e2697048cb586c9b32e90cf21ff4b3dfd70fab77c5fd0

    registry.redhat.io/codeready-workspaces/plugin-java8-openj9-rhel8@sha256:4dd576f6cfd6ef0355d577ce751175ad3ac21d53b1a6ce056c7df01169918aec

    plugin-java8-openj9-rhel8@sha256:4dd576f6cfd6ef0355d577ce751175ad3ac21d53b1a6ce056c7df01169918aec

    registry.redhat.io/codeready-workspaces/plugin-java8-rhel8@sha256:81548d8559fdc3ba3e2b1ec398f3bd94728e8e4037a4c3a180177f20c9704db9

    plugin-java8-rhel8@sha256:81548d8559fdc3ba3e2b1ec398f3bd94728e8e4037a4c3a180177f20c9704db9

    registry.redhat.io/codeready-workspaces/plugin-kubernetes-rhel8@sha256:b284a345abe28ecbeb51261bd99a89870f4a0b37fea4780e3e31d7e2a946936c

    plugin-kubernetes-rhel8@sha256:b284a345abe28ecbeb51261bd99a89870f4a0b37fea4780e3e31d7e2a946936c

    registry.redhat.io/codeready-workspaces/plugin-openshift-rhel8@sha256:7b176e808a370a7ea115652463a2035a324e1e5ab0286bc8091284ee005e47d4

    plugin-openshift-rhel8@sha256:7b176e808a370a7ea115652463a2035a324e1e5ab0286bc8091284ee005e47d4

    registry.redhat.io/codeready-workspaces/pluginbroker-artifacts-rhel8@sha256:bb471b89e7df1f2178bf0e2c75b5d71601e35555b31358138c9933391e5f00f0

    pluginbroker-artifacts-rhel8@sha256:bb471b89e7df1f2178bf0e2c75b5d71601e35555b31358138c9933391e5f00f0

    registry.redhat.io/codeready-workspaces/pluginbroker-metadata-rhel8@sha256:db2838f1a2a868d9f3e2b2f7eb9db12fe0e41a0e7bb053dbe11661b235b1db59

    pluginbroker-metadata-rhel8@sha256:db2838f1a2a868d9f3e2b2f7eb9db12fe0e41a0e7bb053dbe11661b235b1db59

    registry.redhat.io/codeready-workspaces/pluginregistry-rhel8@sha256:798931885554875fe728d1fe84bfed70c844902a1e67ce0d451ce82156ebca4c

    pluginregistry-rhel8@sha256:798931885554875fe728d1fe84bfed70c844902a1e67ce0d451ce82156ebca4c

    registry.redhat.io/codeready-workspaces/server-rhel8@sha256:090a78d53f9781fbd360bdf74a3e1bbf5f5e2189ec6ba7dbc772f299d99b5c4f

    server-rhel8@sha256:090a78d53f9781fbd360bdf74a3e1bbf5f5e2189ec6ba7dbc772f299d99b5c4f

    registry.redhat.io/codeready-workspaces/stacks-cpp-rhel8@sha256:b3c318ddf23e6fcdd8cc307b135a3e570a6787f97b51461daf948ddddb6171

    stacks-cpp-rhel8@sha256:b3c318ddf23e6fcdd8cc307b135a3e570a6787f97b51461daf94948ddddb6171

    registry.redhat.io/codeready-workspaces/stacks-dotnet-rhel8@sha256:6f0534ca7f9727a57719f99fe02fe72557d814d28d7dc233de32bb0496422835

    stacks-dotnet-rhel8@sha256:6f0534ca7f9727a57719f99fe02fe72557d814d28d7dc233de32bb0496422835

    registry.redhat.io/codeready-workspaces/stacks-golang-rhel8@sha256:415c265e03a1f253fb5484139653a3363c7ad466263bf6ab3a9bd201369324cc

    stacks-golang-rhel8@sha256:415c265e03a1f253fb5484139653a3363c7ad466263bf6ab3a9bd201369324cc

    registry.redhat.io/codeready-workspaces/stacks-php-rhel8@sha256:3a6ff083fde5d262456c96b4752e3d802046ef14d9864f52aa31176aff18bcdd

    stacks-php-rhel8@sha256:3a6ff083fde5d262456c96b4752e3d802046ef14d9864f52aa31176aff18bcdd

    registry.redhat.io/codeready-workspaces/theia-endpoint-rhel8@sha256:ae77e83cdf64acd95c0558261c6e5a35049a894f39a7e1debfb709c3b976b262

    theia-endpoint-rhel8@sha256:ae77e83cdf64acd95c0558261c6e5a35049a894f39a7e1debfb709c3b976b262

    registry.redhat.io/codeready-workspaces/theia-rhel8@sha256:d9e2e5d0690874f8e9ff47c3badd533ac4addd2a54182ac8a5de3a34b0f1497a

    theia-rhel8@sha256:d9e2e5d0690874f8e9ff47c3badd533ac4addd2a54182ac8a5de3a34b0f1497a

    registry.redhat.io/codeready-workspaces/traefik-rhel8@sha256:a2d87970ffc0a191ce474a3ae7fd16da896e4c5fe7cbe91fcb5fc730fa3dd993

    traefik-rhel8@sha256:a2d87970ffc0a191ce474a3ae7fd16da896e4c5fe7cbe91fcb5fc730fa3dd993

    registry.redhat.io/devworkspace/devworkspace-rhel8-operator@sha256:e68ec2fe7ac27e59641bdfc7794ae99fdfaa60e5b6d0cc0e3f20ab3f7a31bc11

    devworkspacedevworkspace-rhel8-operator@sha256:e68ec2fe7ac27e59641bdfc7794ae99fdfaa60e5b6d0cc0e3f20ab3f7a31bc11

    registry.redhat.io/jboss-eap-7/eap-xp3-openj9-11-openshift-rhel8@sha256:44f82c43a730acbfb4ce2be81ca32197099c370eeb85cedbee3d1e89e9ac7684

    eap-xp3-openj9-11-openshift-rhel8@sha256:44f82c43a730acbfb4ce2be81ca32197099c370eeb85cedbee3d1e89e9ac7684

    registry.redhat.io/jboss-eap-7/eap-xp3-openjdk11-openshift-rhel8@sha256:3875b2ee2826a6d8134aa3b80ac0c8b5ebc4a7f718335d76dfc3461b79f93d19

    eap-xp3-openjdk11-openshift-rhel8@sha256:3875b2ee2826a6d8134aa3b80ac0c8b5ebc4a7f718335d76dfc3461b79f93d19

    registry.redhat.io/jboss-eap-7/eap74-openjdk8-openshift-rhel7@sha256:b4a113c4d4972d142a3c350e2006a2b297dc883f8ddb29a88db19c892358632d

    eap74-openjdk8-openshift-rhel7@sha256:b4a113c4d4972d142a3c350e2006a2b297dc883f8ddb29a88db19c892358632d

    registry.redhat.io/openshift4/ose-kube-rbac-proxy@sha256:86e5fa1fa294987114be200890c2e516501e424aee0fb98ece25c95e7716295b

    openshift4ose-kube-rbac-proxy@sha256:86e5fa1fa294987114be200890c2e516501e424aee0fb98ece25c95e7716295b

    registry.redhat.io/openshift4/ose-oauth-proxy@sha256:30692aed2508e0576f9769fedb87333ab027babda774a870edfbdf2b3ecabed0

    openshift4ose-oauth-proxy@sha256:30692aed2508e0576f9769fedb87333ab027babda774a870edfbdf2b3ecabed0

    registry.redhat.io/rh-sso-7/sso74-openj9-openshift-rhel8@sha256:db43655b39ef29a3a96f8d454a3f03cd750770473b8ac8cbe4b2bc10616029f6

    sso74-openj9-openshift-rhel8@sha256:db43655b39ef29a3a96f8d454a3f03cd750770473b8ac8cbe4b2bc10616029f6

    registry.redhat.io/rh-sso-7/sso74-openshift-rhel8@sha256:becab7360738f4fc637785698b4a1327de81b8443577ae432132d6f6435f593c

    sso74-openshift-rhel8@sha256:becab7360738f4fc637785698b4a1327de81b8443577ae432132d6f6435f593c

    registry.redhat.io/rhel8/postgresql-13@sha256:487183263b25ff4a0d68e97f17756aa9600ca640b20804ca34f19718e471f647

    postgresql-13@sha256:487183263b25ff4a0d68e97f17756aa9600ca640b20804ca34f19718e471f647

    registry.redhat.io/rhel8/postgresql-96@sha256:314747a4a64ac16c33ead6a34479dccf16b9a07abf440ea7eeef7cda4cd19e32

    postgresql-96@sha256:314747a4a64ac16c33ead6a34479dccf16b9a07abf440ea7eeef7cda4cd19e32

    registry.redhat.io/rhscl/mongodb-36-rhel7@sha256:9f799d356d7d2e442bde9d401b720600fd9059a3d8eefea6f3b2ffa721c0dc73

    mongodb-36-rhel7@sha256:9f799d356d7d2e442bde9d401b720600fd9059a3d8eefea6f3b2ffa721c0dc73

    registry.redhat.io/ubi8/ubi-minimal@sha256:c536d4c63253318fdfc1db499f8f4bb0881db7fbd6f3d1554b4d54c812f85cc7

    ubi8ubi-minimal@sha256:c536d4c63253318fdfc1db499f8f4bb0881db7fbd6f3d1554b4d54c812f85cc7

検証手順

  • イメージに同じダイジェストがあることを確認します。

    $ skopeo inspect docker://<source-image>
    $ skopeo inspect docker://<target-registry>/<target-organization>/<target-image>

関連情報