3.5.2.7.2. 追加タグのイメージストリームへの追加
既存タグのいずれかをポイントするタグを追加するには、oc tag
コマンドを使用できます。
oc tag <image-name:tag> <image-name:tag>
以下に例を示します。
$ oc tag python:3.5 python:latest
出力例
Tag python:latest set to python@sha256:49c18358df82f4577386404991c51a9559f243e0b1bdc366df25.
oc describe
コマンドを使用して、イメージストリームに、外部コンテナーイメージを参照するタグ (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