Uploading container images to your openshift registry
by Juan Antonio Osorio Robles
I recently started exploring OpenShift, and while I did find the concept of builds and imagestreams to be quite useful. I didn’t find a straight forward way to upload a docker image from my machine towards the cluster’s image registry.
So, for reference, I gathered this script from the CI scripts of the openshift logging project.
This allows you to use localhost:5000 as an endpoint to upload your images towards your clusters image registry. Note that you’ll need to specify the specific openshift “project” as part of the path when you’re uploading images.
Lets say, for instance, that you want to upload the image
my-image, and you
have access to the project
default. You’ll do:
Note when you want to use your new image in an application, you must replace
since that’s the URL that OpenShift makes available.
So, you’ll have something as:
Note that I also tried to create a route towards the openshift-image-registry service. However, that didn’t work for me, as the registry wasn’t getting my requests.
Special thanks to Rich Megginson for guiding my through the CI scripts.