Download the runtime image
The information from your runtime definition JSON that is fetched by using v2/runtime_definitions
can be used to download the runtime image for customization.
Follow these steps to use the information to download the runtime image for customization by using information fetched by v2/runtime_definitions
:
-
Get the name of the image from
.entity.launch_configuration.image
in the runtime definition JSON. For more information, see Downloading the runtime definition.The following code snippet shows how to get the image name from
runtime-23.1-py3.10-server.json
runtime definition JSON:cat ${myRuntimeDefinition}-server.json | jq ".launch_configuration.image"
Note:In this example, the section is already saved with the
.entity
object. Therefore, you must search for.launch_configuration.image
.This returns the following output sample:
"cp.icr.io/cp/cpd/wml-dep-rt23-1-ms@sha256:cd663336491934ea2917eb650b712761cfaa85f8c1a09e73b069ccd84f7226d7"
In this case, you must download the
wml-dep-rt23-1-ms@sha256:cd663336491934ea2917eb650b712761cfaa85f8c1a09e73b069ccd84f7226d7
image.Note:The piece of the image URL can be empty, depending on the way Cloud Pak for Data was installed.
-
To download the image, choose one of these methods:
- If you have access to the IBM Entitled registry URL, you can download the base image directly from:
cp.icr.io/cp/cpd/wml-dep-rt23-1-ms@sha256:cd663336491934ea2917eb650b712761cfaa85f8c1a09e73b069ccd84f7226d7
- Download the image from the private registry if you configured the image to mirror at installation time. For example, use this code snippet to download the image:
<private_registry_url>/wml-dep-rt23-1-ms@sha256:cd663336491934ea2917eb650b712761cfaa85f8c1a09e73b069ccd84f7226d7
-
Log in to Docker or Podman.
The following code snippet shows how to log in to Docker:
docker login -u <username> -p <password> <image-registry-url>
Note:The login syntax for Podman, other than the command name, is the same.
-
Download the image.
The following code snippet shows how to download the image from Docker:
docker pull <image-registry-url>/wml-dep-rt23-1-ms@sha256:cd663336491934ea2917eb650b712761cfaa85f8c1a09e73b069ccd84f7226d7
Note: The name of the runtime image that you need to download for your custom image is in the JSON configuration file.
Parent topic: Preparing to build a custom image