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.
-
You are logged in to the RHEL 9.6 host where the image was built using the user credentials that have
sudopermissions. -
You have a remote registry such as Red Hat Quay for storing and accessing bootc images.
-
You created the Containerfile and built the image.
-
Set the
REGISTRY_URLvariable for the image by running the following command:$ REGISTRY_URL=<quay.io>Replace
<quay.io>with the URL for your image registry. -
Log in to your remote registry by running the following command:
$ sudo podman login "${REGISTRY_URL}" -
Set the
IMAGE_NAMEvariable 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.
-
Set the
REGISTRY_IMGvariable 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. -
Publish the image by running the following command:
$ sudo podman push localhost/"${IMAGE_NAME}" "${REGISTRY_URL}/${REGISTRY_IMG}"
-
Run the container using the image you pushed to your registry as described in the "Running the MicroShift bootc container" section.