Downloading the runtime image

Locate the name of the runtime image in the runtime definition file and then download it.

Follow these steps to download the runtime image:

  1. Get the name of the image by searching for "image" in the configuration file.
    • Example in the jupyter-222n-py-server.json configuration file:
      [...]
      "replicas": 1,
      "image": "cp.icr.io/cp/cpd/wslocal-runtime-py310main@sha256:491c86cb5604a1fe0816a5a7a59a52acf14bdf8eae11d136d4a018dc030d8bbc", "command": \["/usr/sbin/tini", "--", "/opt/ibm/ws/bin/setup_container.sh"],
      [...]
      
      
      In this case, wslocal-runtime-py310main@sha256:491c86cb5604a1fe0816a5a7a59a52acf14bdf8eae11d136d4a018dc030d8bbc is the image that you must download.
    • Example in the rstudio-r42-server.json configuration file:
      [...]
      "replicas": 1,
      "image": "cp.icr.io/cp/cpd/wslocal-runtime-rstudio-r42@sha256:de79fcbbd21b62d6d5edb4b392b554777c445d9a5d9aee9a4eb26153f788e0a2", "privileged": false,
      "command": ["/scripts/icp4d/startup.sh"],
      [...]
      
      
      In this case, wslocal-runtime-rstudio-r42@sha256:de79fcbbd21b62d6d5edb4b392b554777c445d9a5d9aee9a4eb26153f788e0a2 is the image that you must download.
  2. Get the URL to the Docker registry where the image is located. Use the registry URL which was used during the installation of IBM® Software Hub to pull the image, for example the wslocal-runtime-py310main@sha256:491c86cb5604a1fe0816a5a7a59a52acf14bdf8eae11d136d4a018dc030d8bbc image:
    1. If you are using a private registry, get the location of the private container registry, which is stored in the PRIVATE_REGISTRY_LOCATION variable. If your cluster is connected to the Internet, you can pull the image directly from the IBM entitled registry, cp.icr.io/cp/cpd, by using the IBM_ENTITLEMENT_KEY variable. For details, see Setting up installation environment variables. The value in these variables is the URL to the external image registry.
    2. Use that value to modify the <image-registry-url>/<namespace> part of the URL to the image:
      <image-registry-url>/<namespace>/wslocal-runtime-py310main@sha256:491c86cb5604a1fe0816a5a7a59a52acf14bdf8eae11d136d4a018dc030d8bbc
      
      
      
      Important: The name of the image that you pull, update (using the Dockerfile), upload (using a new custom image name) and add to the renamed runtime definition file must have the following format: registry/<namespace>/actual_image_name.
  3. Download the image. To download, you can use a command line utility like Docker, Podman or Skopeo, which must be installed on your server or workstation. You must have a valid IBM Software Hub user name and password and administrator rights to log in to the registry to download the image. Use the URL that you located in the previous step for <image-registry-url> in the following commands.
    For Docker or Podman:
    1. Log in to the utility. The following code snippet shows using Docker. The login syntax for Podman, other than command name, is the same:
      docker login -u cp -p ${IBM_ENTITLEMENT_KEY} cp.icr.io
      
      
      
    2. Download the image, for example, the wslocal-runtime-py310main@sha256:491c86cb5604a1fe0816a5a7a59a52acf14bdf8eae11d136d4a018dc030d8bbc image from the environment template JSON file jupyter-222n-py-server.json. The code snippet shows using Docker. The Podman command syntax is the same.
      docker pull <image-registry-url>/<namespace>/wslocal-runtime-py310main@sha256:491c86cb5604a1fe0816a5a7a59a52acf14bdf8eae11d136d4a018dc030d8bbc
      
      
      

    For Skopeo:

    Skopeo does not need a separate login command. If you use Skopeo, you can download the image directly from the registry. However, the download destination of the image is different depending on whether you use Docker or Podman with Buildah to build the custom package.

    Download the image to enable a Docker build:
    skopeo copy –src-creds <username>:<password> docker://<image-registry-url>/<namespace>/wslocal-runtime-py310main@sha256:491c86cb5604a1fe0816a5a7a59a52acf14bdf8eae11d136d4a018dc030d8bbc
    docker-daemon:wslocal-runtime-py310main@sha256:491c86cb5604a1fe0816a5a7a59a52acf14bdf8eae11d136d4a018dc030d8bbc
    
    
    Or a Podman/Buildah build:
    skopeo copy –src-creds <username>:<password> docker://<image-registry-url>/<namespace>/wslocal-runtime-py310main@sha256:491c86cb5604a1fe0816a5a7a59a52acf14bdf8eae11d136d4a018dc030d8bbc containers-storage:wslocal-runtime-py310main@sha256:491c86cb5604a1fe0816a5a7a59a52acf14bdf8eae11d136d4a018dc030d8bbc