Skip to content

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:

  1. With a terminal, connect to the Rahti 2 registry:

    docker login -p $(oc whoami -t ) -u unused image-registry.apps.2.rahti.csc.fi
    

  2. Tag the image you want to push:

    docker tag centos:7 image-registry.apps.2.rahti.csc.fi/{YOUR_PROJECT_NAME}/centos:<tag>
    
    Replace {YOUR_PROJECT_NAME} by the name of your project.

  3. 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:
Image Streams

Use the image

Go to your project's deployment or DeploymentConfig, and edit it.

Edit deployment

Go to the Images section, make sure the option "Deploy images from an image stream tag" is clicked. Finally select the new image.

Use cached image