Search This Blog

Friday, February 23, 2018

How to import and tag an image from docker hub

If you want to craete an image stream and generate tag(latest) from the docker hub image,
you can use this YAML to create the image stream config and later run below command

STep 1 

Run YAML on openshift - -add to project 


//
kind: List  apiVersion: v1  items:    - kind: ImageStream    apiVersion: v1    metadata:      labels:        app: rhel7-weblogic      name: rhel7-weblogic    spec: {}


AFter this you can run this 

oc import-image rhel7-weblogic  --from=dockerusername/rhel7-weblogic --confirm

It will generate the latest tag and bind it to the dockerhub registry , you wont see failed builds in case yo u
have refered this imagestream in any of your other YAML in openshift 

No comments:

Post a Comment