Build and run a bootable container image with image mode for RHEL and Podman Desktop

Learn how to locally build and run a bootable container (bootc) image in Podman Desktop.

Get the RHEL bootc base image

The Red Hat SSO extension in Podman Desktop allows you to register with a no-cost developer subscription and access the Red Hat Container Registry for image mode for RHEL binary. 

Get the Red Hat Extension Pack for Podman Desktop to access all the Red Hat extensions. The Red Hat Extension Pack consists of:

  • Red Hat OpenShift Local
  • Red Hat SSO
  • AI Lab
  • Developer Sandbox
  • bootc extension

Prerequisites:

  • A no-cost Red Hat Developer subscription.
  • Podman Desktop.
    • You can download Podman Desktop for Windows, MacOS, or Linux.

In this lesson, you will:

  • Add the Red Hat Extension Pack.
  • Sign in using Red Hat SSO and the Red Hat Authentication extension.

Add the Red Hat Extension Pack

In this learning path, we will use Red Hat SSO and bootc extension to create and build a bootable container. Follow these steps to get started:

  1. Open Podman Desktop on your local machine.
    Note: If this is your first time using Podman Desktop, you may be prompted to install Podman and set up a Podman machine. Follow those steps before continuing.
  2.  Navigate to Extensions -> Catalog and locate the Red Hat Extension Pack as shown in Figure 1. 

    Catalog tab within the Extensions view of Podman Desktop.
    Figure 1: Catalog tab of the Extensions section in Podman Desktop
  3. Select the option to install the Red Hat Extension Pack. Once the installation is finished, you will see additional icons for AI Lab and Bootable Containers in the side menu bar.

The Extension Pack is now installed. Next, you’ll need to sign in using Red Hat SSO and the Red Hat Authentication extension. 

To do this:

  1. Select the Installed tab from the Extensions section and scroll down to locate the Red Hat Authentication extension as shown in Figure 2. 

    Installed tab within the Extensions view of Podman Desktop showing the Red Hat Authentication extension as being active.
    Figure 2: Installed tab of the Extensions section in Podman Desktop
  2. Select Settings from the bottom of the side menu bar and navigate to Authentication. You will see Red Hat SSO listed and that you are currently logged out (Figure 3).

    Authentication settings for Podman Desktop displaying information showing that the user is currently logged out of Red Hat SSO.
    Figure 3: Authentication tab with Red Hat SSO showing as LOGGED OUT.
  3. Select Sign in to continue. 
  4. In the new window that opens (Figure 4), enter your Red Hat account login credentials or register and create a developer account if you haven’t already.

    ed Hat account log in page with a form field for username or email and additional options to log in with GitHub, Google or Microsoft.
    Figure 4: Red Hat account log in page.

    The authentication plug-in logs into the Red Hat container registry and runs subscription-manager on the podman-machine. If you are running Red Hat Enterprise Linux, this will work automatically if you are registered. 

    If you are using another Linux distribution like Fedora, we recommend that you proceed with the authentication plug-in for the registry, add subscription-manager to your system, and register. Registering a Fedora host will make subscriptions "just work" with RHEL containers.

    To do this on Fedora, type the following (replace the username and password with your own):

    sudo dnf install subscription-manager && sudo subscription-manager register --username YOUR_REDHAT_USERNAME --password YOUR_REDHAT_PASSWORD --auto-attach
  5. Once you log in, go back to Podman Desktop. The status for Red Hat SSO in Settings -> Authentication will update to show that you are LOGGED IN. 
  6. Navigate to Settings -> Registries and verify that you have an entry for Red Hat Container Registry as a configured registry location (Figure 5).

    List of available registries in the Podman Desktop settings section. The option for Red Hat Container Registry is showing as configured with a username and password.
    Figure 5: Red Hat Container Registry is configured once Red Hat Account log in is successfully completed.

Now that you’ve added the SSO extension and have access to the container registry, it’s time to create a disk image and set up a virtual machine.

Previous resource
Overview: Build and run a bootable container image with image mode for RHEL and Podman Desktop
Next resource
Build and run a disk image in Podman Desktop