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:
- Get the name of the image by searching for
"image"in the configuration file.- Example in the
jupyter-222n-py-server.jsonconfiguration file:
In this case,[...] "replicas": 1, "image": "cp.icr.io/cp/cpd/wslocal-runtime-py310main@sha256:491c86cb5604a1fe0816a5a7a59a52acf14bdf8eae11d136d4a018dc030d8bbc", "command": \["/usr/sbin/tini", "--", "/opt/ibm/ws/bin/setup_container.sh"], [...]wslocal-runtime-py310main@sha256:491c86cb5604a1fe0816a5a7a59a52acf14bdf8eae11d136d4a018dc030d8bbcis the image that you must download. - Example in the
rstudio-r42-server.jsonconfiguration file:
In this case,[...] "replicas": 1, "image": "cp.icr.io/cp/cpd/wslocal-runtime-rstudio-r42@sha256:de79fcbbd21b62d6d5edb4b392b554777c445d9a5d9aee9a4eb26153f788e0a2", "privileged": false, "command": ["/scripts/icp4d/startup.sh"], [...]wslocal-runtime-rstudio-r42@sha256:de79fcbbd21b62d6d5edb4b392b554777c445d9a5d9aee9a4eb26153f788e0a2is the image that you must download.
- Example in the
- 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:491c86cb5604a1fe0816a5a7a59a52acf14bdf8eae11d136d4a018dc030d8bbcimage:- If you are using a private registry, get the location of the private container registry, which
is stored in the
PRIVATE_REGISTRY_LOCATIONvariable. 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 theIBM_ENTITLEMENT_KEYvariable. For details, see Setting up installation environment variables. The value in these variables is the URL to the external image registry. - 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:491c86cb5604a1fe0816a5a7a59a52acf14bdf8eae11d136d4a018dc030d8bbcImportant: 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.
- If you are using a private registry, get the location of the private container registry, which
is stored in the
- 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:- 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 - Download the image, for example, the
wslocal-runtime-py310main@sha256:491c86cb5604a1fe0816a5a7a59a52acf14bdf8eae11d136d4a018dc030d8bbcimage from the environment template JSON filejupyter-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:491c86cb5604a1fe0816a5a7a59a52acf14bdf8eae11d136d4a018dc030d8bbcOr 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 - Log in to the utility. The following code snippet shows using Docker. The login syntax for
Podman, other than command name, is the
same: