Breadcrumb

  1. Red Hat Interactive Learning Portal
  2. Red Hat Enterprise Linux learning
  3. Build a bootable Python Flask application using image mode for RHEL with Podman Desktop
  4. Access the Red Hat Container Registry

Build a bootable Python Flask application using RHEL Image Mode with Podman Desktop

Use Podman Desktop to create a bootable Flask-based application using image mode for RHEL. We will integrate Flask, Gunicorn, and NGINX into a bootable container.

Download Podman Desktop

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:

In this lesson, you will:

  • 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 the Red Hat build of 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.

  1. Because you are using the Red Hat build of Podman Desktop, the bootable container, Red Hat Subscriptions, registries, and VM extensions used through the lab are pre-installed (Figure 1). 

    Installed tab of the Extensions section in Podman Desktop.
    Figure 1: Installed tab of the Extensions section in Podman Desktop.
  2. Sign in using Red Hat SSO and the Red Hat Authentication extension. 
  3. Select the Installed tab from the Extensions section and scroll down to locate the Red Hat Authentication (Figure 2). 
     

    Installed tab of the Extensions section in Podman Desktop.
    Figure 2: Installed tab of the Extensions section in Podman Desktop.
  4. Select Settings from the bottom of the left side menu bar and navigate to Authentication. You will see that Red Hat SSO is on the list and that you are currently logged out (Figure 3).

    The Authentication tab with Red Hat SSO showing as LOGGED OUT.
    Figure 3: The Authentication tab with Red Hat SSO showing as LOGGED OUT.
  5. Select Sign in to continue. 
  6. In the new window that opens, enter your Red Hat account login credentials or register and create a developer account if you haven’t already (Figure 4).

    The Red Hat account log in page.
    Figure 4: The 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 running Red Hat Enterprise Linux, this will work automatically if on a  registered system.

  7. 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. 
  8. Navigate to Settings -> Registries and verify that you have an entry for Red Hat Container Registry as a configured registry location (Figure 5).

    Red Hat Container Registry is configured once Red Hat Account log in is successfully completed.
    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 a bootable Python Flask application using image mode for RHEL with Podman Desktop
Next resource
Build a sample Python Flask application in a container used for development