Red Hat Training

A Red Hat training course is available for OpenShift Container Platform

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)와 첫 번째 태그를 기반으로 생성되었기 때문에 동일한 이미지를 가리키는 다른 태그(최신) 태그가 있는지 확인합니다.

$ 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