Creating a custom image
Build a new custom image by adding your customizations to the standard image that you downloaded. You can build a custom image on any server or workstation that runs Docker, Podman or Skopeo. The custom image does not have to be created on Red Hat® Enterprise Linux®.
To customize an image:
- Add your customizations to the Dockerfile. To get started based on recommended best practices
and methods for building efficient images, see Adding customizations to images based on Runtime 25.1 and Adding customizations to images based on Runtime 24.1.
The image is built by reading the instructions from the Dockerfile. The Dockerfile takes as input the
base-image-tagargument with the name of base image that you downloaded as its value.To avoid introducing a breaking change which could prevent the new image from working in IBM® Software Hub, use the example commands that Dockerfile provides.
- Build the new image. The example command shows building a new image based on the
wslocal-runtime-241-py@sha256:f21b54dee335c9a39de5980a41ac2a422a2bda8820b91da005dba53ba5857434image. The value of<your_image_registry_location>is the URL to the external registry that was used during the installation of IBM Software Hub.For Docker, enter:docker build -t <new-image-name>:<new-image-tag> --build-arg base_image_tag= <your_image_registry_location>/wslocal-runtime-241-py@sha256:f21b54dee335c9a39de5980a41ac2a422a2bda8820b91da005dba53ba5857434 -f <path_to_dockerfile>For Buildah, enter:buildah bud -t <new-image-name>:<new-image-tag> --build-arg base_image_tag= <your_image_registry_location>/wslocal-runtime-241-py@sha256:f21b54dee335c9a39de5980a41ac2a422a2bda8820b91da005dba53ba5857434 -f <path_to_dockerfile>