How to manually cache images in Rahti 2
It is possible to manually cache images in Rahti 2. This could be useful to remove an external dependency or improve performance.
The process is simple:
-
Install and login with OC.
-
With a terminal, connect to the Rahti 2 registry:
docker login -p $(oc whoami -t ) -u unused image-registry.apps.2.rahti.csc.fi
Info
If you get any error, make sure you are logged in. If you run
oc whoami
, the command should return your username. -
Tag the image you want to push:
Replace {YOUR_PROJECT_NAME} by the name of your project.docker tag centos:7 image-registry.apps.2.rahti.csc.fi/{YOUR_PROJECT_NAME}/centos:<tag>
-
Push your image:
docker push image-registry.apps.2.rahti.csc.fi/{YOUR_PROJECT_NAME}/centos:<tag>
You should be able to see your images in your project:
Use the image
Go to your project's deployment, and edit it.
Go to the Images section, make sure the option "Deploy images from an image stream tag" is clicked. Finally select the new image.