6.7.2. タグのイメージストリームへの追加
追加タグをイメージストリームに追加できます。
手順
既存タグのいずれかを参照するタグを追加するには、
oc tag
コマンドを使用できます。$ oc tag <image-name:tag1> <image-name:tag2>
以下に例を示します。
$ oc tag python:3.5 python:latest Tag python:latest set to python@sha256:49c18358df82f4577386404991c51a9559f243e0b1bdc366df25.
イメージストリームに、外部コンテナーイメージを参照するタグ (
3.5
) と、この最初のタグに基づいて作成されているために同じイメージを参照する別のタグ (latest
) の 2 つのタグが含まれることを確認します。$ oc describe is/python Name: python Namespace: default Created: 5 minutes ago Labels: <none> Annotations: openshift.io/image.dockerRepositoryCheck=2017-10-02T17:05:11Z Docker Pull Spec: docker-registry.default.svc:5000/default/python Image Lookup: local=false Unique Images: 1 Tags: 2 latest tagged from python@sha256:49c18358df82f4577386404991c51a9559f243e0b1bdc366df25 * centos/python-35-centos7@sha256:49c18358df82f4577386404991c51a9559f243e0b1bdc366df25 About a minute ago 3.5 tagged from centos/python-35-centos7 * centos/python-35-centos7@sha256:49c18358df82f4577386404991c51a9559f243e0b1bdc366df25 5 minutes ago