1.3. Publishing 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.4 host where the image was built using the user credentials that have
sudopermissions. - You have a remote registry such as {quay} for storing and accessing bootc images.
- You created the Containerfile and built the image.
Procedure
Log in to your remote registry by running the following command:
REGISTRY_URL=quay.io $ sudo podman login "${REGISTRY_URL}"1 - 1
- Replace REGISTRY_URL with the URL for your registry.
Publish the image by running the following command:
REGISTRY_IMG=<myorg/mypath>/"${IMAGE_NAME}"1 2 IMAGE_NAME=<microshift-4.17-bootc>3 $ sudo podman push localhost/"${IMAGE_NAME}" "${REGISTRY_URL}/${REGISTRY_IMG}"
Verification
- Run the container using the image you pushed to your registry as described in the "Running the MicroShift bootc container" section.