Overview: Build a hardened Flask stack and deploy it in image mode for Red Hat Enterprise Linux
In this learning path, you will build a modern Python web stack using Linux®, NGINX, PostgreSQL, and Flask. You will start by running your application in small, trusted containers called Red Hat® Hardened Images. Then, you will learn how to embed those containers directly into a Red Hat Enterprise Linux operating system using image mode for Red Hat Enterprise Linux. By the end, you will have a single disk image that you can boot as a virtual machine (VM). It will have your application, database, and web server ready to operate at startup.
Traditional container images often come with unnecessary software components that carry security vulnerabilities. This requires your security team to triage inherited bugs. Hardened Images are distroless and micro-sized. They contain only the required software your code needs to run. This approach provides:
Less noise: Receive fewer alerts about security bugs in unused software.
More coding: Spend less time patching underlying infrastructure and more time building features.
When you deploy this environment, you will use image mode for Red Hat Enterprise Linux as your run-time operating platform. This ensures you are running an operating system approved by corporate IT. The entire environment, including Hardened Images and the approved operating system, is delivered as a single bootable container. If the container functions as a VM, running on your local machine, it will function exactly the same way when booted as a server.
Prerequisites:
- A Red Hat Enterprise Linux subscription, available at no cost from developers.redhat.com.
- Red Hat Enterprise Linux, CentOS Stream, or Fedora Linux with the subscription-manager package installed
In this learning path, you will:
- Create and run a Flask application locally.
- Configure the operating system.
- Package the application and operating system into a single verified image.
- Create a bootable virtual machine.