1OC(1)                              June 2016                             OC(1)
2
3
4

NAME

6       oc tag - Tag existing images into image streams
7
8
9

SYNOPSIS

11       oc tag [OPTIONS]
12
13
14

DESCRIPTION

16       Tag existing images into image streams
17
18
19       The  tag  command  allows  you to take an existing tag or image from an
20       image stream, or a Docker image pull spec,  and  set  it  as  the  most
21       recent  image for a tag in 1 or more other image streams. It is similar
22       to the 'docker tag' command, but it operates on image streams instead.
23
24
25       Pass the --insecure flag if your external  registry  does  not  have  a
26       valid  HTTPS certificate, or is only served over HTTP. Pass --scheduled
27       to have the server regularly check the tag for updates and  import  the
28       latest  version  (which  can then trigger builds and deployments). Note
29       that --scheduled is only allowed for Docker images.
30
31
32

OPTIONS

34       --alias=false
35           Should the destination tag  be  updated  whenever  the  source  tag
36       changes. Applies only to a single image stream. Defaults to false.
37
38
39       -d, --delete=false
40           Delete the provided spec tags.
41
42
43       --insecure=false
44           Set  to  true if importing the specified Docker image requires HTTP
45       or has a self-signed certificate. Defaults to false.
46
47
48       --reference=false
49           Should the destination tag continue to pull from the source  names‐
50       pace. Defaults to false.
51
52
53       --reference-policy="source"
54           Allow  to  request  pullthrough  for  external  image  when  set to
55       'local'. Defaults to 'source'.
56
57
58       --scheduled=false
59           Set a Docker image to be periodically imported from a remote repos‐
60       itory. Defaults to false.
61
62
63       --source=""
64           Optional  hint  for the source type; valid values are 'imagestream‐
65       tag', 'istag', 'imagestreamimage', 'isimage', and 'docker'.
66
67
68

OPTIONS INHERITED FROM PARENT COMMANDS

70       --allow_verification_with_non_compliant_keys=false
71           Allow  a  SignatureVerifier  to  use  keys  which  are  technically
72       non-compliant with RFC6962.
73
74
75       --alsologtostderr=false
76           log to standard error as well as files
77
78
79       --application_metrics_count_limit=100
80           Max number of application metrics to store (per container)
81
82
83       --as=""
84           Username to impersonate for the operation
85
86
87       --as-group=[]
88           Group  to  impersonate for the operation, this flag can be repeated
89       to specify multiple groups.
90
91
92       --azure-container-registry-config=""
93           Path to the file containing Azure container registry  configuration
94       information.
95
96
97       --boot_id_file="/proc/sys/kernel/random/boot_id"
98           Comma-separated  list  of files to check for boot-id. Use the first
99       one that exists.
100
101
102       --cache-dir="/builddir/.kube/http-cache"
103           Default HTTP cache directory
104
105
106       --certificate-authority=""
107           Path to a cert file for the certificate authority
108
109
110       --client-certificate=""
111           Path to a client certificate file for TLS
112
113
114       --client-key=""
115           Path to a client key file for TLS
116
117
118       --cloud-provider-gce-lb-src-cidrs=130.211.0.0/22,209.85.152.0/22,209.85.204.0/22,35.191.0.0/16
119           CIDRs opened in GCE firewall for LB traffic proxy  health checks
120
121
122       --cluster=""
123           The name of the kubeconfig cluster to use
124
125
126       --container_hints="/etc/cadvisor/container_hints.json"
127           location of the container hints file
128
129
130       --containerd="unix:///var/run/containerd.sock"
131           containerd endpoint
132
133
134       --context=""
135           The name of the kubeconfig context to use
136
137
138       --default-not-ready-toleration-seconds=300
139           Indicates    the    tolerationSeconds   of   the   toleration   for
140       notReady:NoExecute that is added by default to every pod that does  not
141       already have such a toleration.
142
143
144       --default-unreachable-toleration-seconds=300
145           Indicates  the  tolerationSeconds  of  the  toleration for unreach‐
146       able:NoExecute that is added by default to  every  pod  that  does  not
147       already have such a toleration.
148
149
150       --docker="unix:///var/run/docker.sock"
151           docker endpoint
152
153
154       --docker-tls=false
155           use TLS to connect to docker
156
157
158       --docker-tls-ca="ca.pem"
159           path to trusted CA
160
161
162       --docker-tls-cert="cert.pem"
163           path to client certificate
164
165
166       --docker-tls-key="key.pem"
167           path to private key
168
169
170       --docker_env_metadata_whitelist=""
171           a  comma-separated  list of environment variable keys that needs to
172       be collected for docker containers
173
174
175       --docker_only=false
176           Only report docker containers in addition to root stats
177
178
179       --docker_root="/var/lib/docker"
180           DEPRECATED: docker root is read from docker info (this is  a  fall‐
181       back, default: /var/lib/docker)
182
183
184       --enable_load_reader=false
185           Whether to enable cpu load reader
186
187
188       --event_storage_age_limit="default=24h"
189           Max length of time for which to store events (per type). Value is a
190       comma separated list of key values, where  the  keys  are  event  types
191       (e.g.: creation, oom) or "default" and the value is a duration. Default
192       is applied to all non-specified event types
193
194
195       --event_storage_event_limit="default=100000"
196           Max number of events to store (per type). Value is  a  comma  sepa‐
197       rated  list  of  key values, where the keys are event types (e.g.: cre‐
198       ation, oom) or "default" and  the  value  is  an  integer.  Default  is
199       applied to all non-specified event types
200
201
202       --global_housekeeping_interval=0
203           Interval between global housekeepings
204
205
206       --housekeeping_interval=0
207           Interval between container housekeepings
208
209
210       --httptest.serve=""
211           if non-empty, httptest.NewServer serves on this address and blocks
212
213
214       --insecure-skip-tls-verify=false
215           If true, the server's certificate will not be checked for validity.
216       This will make your HTTPS connections insecure
217
218
219       --kubeconfig=""
220           Path to the kubeconfig file to use for CLI requests.
221
222
223       --log-flush-frequency=0
224           Maximum number of seconds between log flushes
225
226
227       --log_backtrace_at=:0
228           when logging hits line file:N, emit a stack trace
229
230
231       --log_cadvisor_usage=false
232           Whether to log the usage of the cAdvisor container
233
234
235       --log_dir=""
236           If non-empty, write log files in this directory
237
238
239       --logtostderr=true
240           log to standard error instead of files
241
242
243       --machine_id_file="/etc/machine-id,/var/lib/dbus/machine-id"
244           Comma-separated list of files to  check  for  machine-id.  Use  the
245       first one that exists.
246
247
248       --match-server-version=false
249           Require server version to match client version
250
251
252       -n, --namespace=""
253           If present, the namespace scope for this CLI request
254
255
256       --request-timeout="0"
257           The  length  of  time  to  wait before giving up on a single server
258       request. Non-zero values should contain a corresponding time unit (e.g.
259       1s, 2m, 3h). A value of zero means don't timeout requests.
260
261
262       -s, --server=""
263           The address and port of the Kubernetes API server
264
265
266       --stderrthreshold=2
267           logs at or above this threshold go to stderr
268
269
270       --storage_driver_buffer_duration=0
271           Writes  in  the  storage driver will be buffered for this duration,
272       and committed to the non memory backends as a single transaction
273
274
275       --storage_driver_db="cadvisor"
276           database name
277
278
279       --storage_driver_host="localhost:8086"
280           database host:port
281
282
283       --storage_driver_password="root"
284           database password
285
286
287       --storage_driver_secure=false
288           use secure connection with database
289
290
291       --storage_driver_table="stats"
292           table name
293
294
295       --storage_driver_user="root"
296           database username
297
298
299       --token=""
300           Bearer token for authentication to the API server
301
302
303       --user=""
304           The name of the kubeconfig user to use
305
306
307       -v, --v=0
308           log level for V logs
309
310
311       --version=false
312           Print version information and quit
313
314
315       --vmodule=
316           comma-separated list of pattern=N settings for  file-filtered  log‐
317       ging
318
319
320

EXAMPLE

322                # Tag the current image for the image stream 'openshift/ruby' and tag '2.0' into the image stream 'yourproject/ruby with tag 'tip'.
323                oc tag openshift/ruby:2.0 yourproject/ruby:tip
324
325                # Tag a specific image.
326                oc tag openshift/ruby@sha256:6b646fa6bf5e5e4c7fa41056c27910e679c03ebe7f93e361e6515a9da7e258cc yourproject/ruby:tip
327
328                # Tag an external Docker image.
329                oc tag --source=docker openshift/origin-control-plane:latest yourproject/ruby:tip
330
331                # Tag an external Docker image and request pullthrough for it.
332                oc tag --source=docker openshift/origin-control-plane:latest yourproject/ruby:tip --reference-policy=local
333
334                # Remove the specified spec tag from an image stream.
335                oc tag openshift/origin-control-plane:latest -d
336
337
338
339

SEE ALSO

341       oc(1),
342
343
344

HISTORY

346       June 2016, Ported from the Kubernetes man-doc generator
347
348
349
350Openshift                  Openshift CLI User Manuals                    OC(1)
Impressum