Publish the bootc image to the remote registry

Publish your bootc image to the remote registry so that the image can be used for running the container on another host, or for when you want to install a new operating system with the bootc image layer.

Prerequisites
  • You are logged in to the RHEL 9.6 host where the image was built using the user credentials that have sudo permissions.

  • You have a remote registry such as Red Hat Quay for storing and accessing bootc images.

  • You created the Containerfile and built the image.

Procedure
  1. Set the REGISTRY_URL variable for the image by running the following command:

    $ REGISTRY_URL=<quay.io>

    Replace <quay.io> with the URL for your image registry.

  2. Log in to your remote registry by running the following command:

    $ sudo podman login "${REGISTRY_URL}"
  3. Set the IMAGE_NAME variable for the image by running the following command:

    $ IMAGE_NAME=<microshift-4.20-bootc>

    Replace <microshift-4.20-bootc> with the name of the image you want to publish.

  4. Set the REGISTRY_IMG variable for the image by running the following command:

    $ REGISTRY_IMG=<myorg/mypath>/"${IMAGE_NAME}"

    Replace <myorg/mypath> with your remote registry organization name and path.

  5. Publish the image by running the following command:

    $ sudo podman push localhost/"${IMAGE_NAME}" "${REGISTRY_URL}/${REGISTRY_IMG}"
Verification
  1. Run the container using the image you pushed to your registry as described in the "Running the MicroShift bootc container" section.