Menu
blog.headdesk.me
blog.headdesk.me

Run RHEL8 on docker with Red Hat UBI image

Posted on 2019/05/132019/05/15

Red Hat is offering a few official docker images for RHEL8. One can now use or build images based on the latest operating system from Red Hat. Here is how to do it in 3 simple steps

Step 1: Create a dockerfile

FROM registry.access.redhat.com/ubi8/ubi
USER root
LABEL maintainer="John Doe"
# Disable RHSM
RUN sed -i -e  's/^\(enabled\).*/\1=0/g' /etc/yum/pluginconf.d/subscription-manager.conf
# Start bash
ENTRYPOINT ["/usr/bin/bash"]

Step 2: Build an image

▶ docker build -t rhel8-ubi .

Step 3: Run the image

▶ docker run -it --name rhel8 3e7fc515a894
 bash-4.4# cat /etc/redhat-release 
 Red Hat Enterprise Linux release 8.0 (Ootpa)

The UBI images get packages from the UBI yum repositories. They do not contain all packages like a full-blown OS. To learn more about the UBI images, please go to this link.

Loading

Full text search

Recent Posts

  • Generate secure password
  • AWS Compute Savings Plans
  • AWS Zonal Shift
  • Coffee break…
  • Prevent private key from being committed to git
  • aws (14)
  • coffee (2)
  • headfi (1)
  • linux (9)
  • others (61)
  • security (2)
  • tech (41)
  • terraform (3)
  • wordpress (2)

Loading

apache aws awscli azure backup boot cloud coffee docker ec2 EL8 ElasticBeanstalk espresso featured git kernel lelit linux lvm meltdown MFA nat gateway php power proliant python rdp Redhat RHEL rpm Ryzen scp security smartarray smart switch snapshot spectre tech terraform ubuntu ubuntu upgrade vpn windows wordpress workspace

©2026 blog.headdesk.me | Powered by SuperbThemes