Chapter 4. Populating your private automation hub container registry By default, private automation hub does not include container images. To populate your container registry, you need to push a container image to it. The procedures in this section describe how to pull images from the Red Hat Ecosystem Catalog (registry.redhat.io), tag them, and push them to your private automation hub container registry. Important Image manifests and filesystem blobs are served directly from registry.redhat.io and registry.access.redhat.com . However, from 1st of May 2023, filesystem blobs are served from quay.io instead. To avoid problems pulling container images, you must enable outbound connections to the following hostnames: cdn.quay.io cdn01.quay.io cdn02.quay.io cdn03.quay.io Make this change to any firewall configuration that specifically enables outbound connections to registry.redhat.io or registry.access.redhat.com . Use the hostnames instead of IP addresses when configuring firewall rules. After making this change you can continue to pull images from registry.redhat.io and registry.access.redhat.com . You do not need a quay.io login, or need to interact with the quay.io registry directly in any way to continue pulling Red Hat container images. 4.1. Prerequisites You have permissions to create new containers and push containers to private automation hub. 4.2. Obtaining images for use in automation hub Before you can push container images to your private automation hub, you must first pull them from an existing registry and tag them for use. This example details how to pull an image from the Red Hat Ecosystem Catalog (registry.redhat.io). Prerequisites You have permissions to pull images from registry.redhat.io. Procedure Log in to Podman using your registry.redhat.io credentials: USD podman login registry.redhat.io Enter your username and password at the prompts. Pull a container image: USD podman pull registry.redhat.io/ <container_image_name> : <tag> Verification List the images in local storage: USD podman images Verify that the image you recently pulled is contained in the list. Verify that the tag is correct. Additional resources See Red Hat Ecosystem Catalog Help for information on registering and getting images. 4.3. Tagging images for use in automation hub After you pull images from a registry, tag them for use in your private automation hub container registry. Prerequisites You have pulled a container image from an external registry. You have the FQDN or IP address of the automation hub instance. Procedure Tag a local image with the automation hub container repository USD podman tag registry.redhat.io/ <container_image_name> : <tag> <automation_hub_URL> / <container_image_name> Verification List the images in local storage: USD podman images Verify that the image you recently tagged with your automation hub information is contained in the list. 4.4. Pushing a container image to private automation hub You can push tagged container images to private automation hub to create new containers and populate the container registry. Prerequisites You have permissions to create new containers. You have the FQDN or IP address of the automation hub instance. Procedure Log in to Podman using your automation hub location and credentials: USD podman login -u= <username> -p= <password> <automation_hub_url> Push your container image to your automation hub container registry: USD podman push <automation_hub_url> / <container_image_name> Note The --remove-signatures flag is required when signed images from registry.redhat.io are pushed to the automation hub container registry. The push operation re-compresses image layers during the upload, which is not guaranteed to be reproducible and is client implementation dependent. This may lead to image-layer digest changes and a failed push operation, resulting in Error: Copying this image requires changing layer representation, which is not possible (image is signed or the destination specifies a digest) . Verification Log in to your automation hub. Navigate to Container Registry . Locate the container in the container repository list.

Commands:
podman login registry.redhat.io
podman pull registry.redhat.io/ <container_image_name> : <tag>
podman images
podman tag registry.redhat.io/ <container_image_name> : <tag> <automation_hub_URL> / <container_image_name>
podman images
podman login -u= <username> -p= <password> <automation_hub_url>
podman push <automation_hub_url> / <container_image_name>