Demo of configuring GitHub Codespaces for Red Hat Enterprise Linux (RHEL) UBI and companion base images.
This repo ships a Codespaces-ready devcontainer plus CI workflows that build and publish container images for RHEL UBI, Rocky Linux, and Fedora variants. Use it as a template for RHEL-flavored development environments or as a reference for shipping pre-built devcontainer images to GHCR.
- Create a Codespace on the main branch.
- The devcontainer defined in .devcontainer/devcontainer.json will boot automatically using a
rockylinux:9base image. - Post-create tasks in .devcontainer/post-create.sh make Zsh the default shell, install Powerlevel10k, and add git aliases from .devcontainer/aliases.sh.
- Start coding—common VS Code extensions (C/C++, Docker, Makefile tools, Copilot Chat, Remote Containers) are preinstalled.
- Base image:
rockylinux:9(override by building your own image with the Dockerfiles below). - Features: common-utils with Zsh,
vscodeuser, package upgrades. - Extensions: listed in .devcontainer/devcontainer.json.
- Shell setup: Powerlevel10k theme and git aliases via .devcontainer/post-create.sh and .devcontainer/aliases.sh.
- RHEL UBI image: built from .devcontainer/Dockerfile; pick a major version via
RHEL_VERSION(8/9/10).
docker build -f .devcontainer/Dockerfile --build-arg RHEL_VERSION=9 -t ghcr.io/<owner>/devcontainer-rhelyeah:rhel-9 .devcontainer- Rocky Linux variants live under .devcontainer/RockyLinux and Fedora under .devcontainer/Fedora.
- RHEL UBI: .github/workflows/build-ubi.yml builds tags
rhel-8,rhel-9,rhel-10, scans with Trivy, and uploads SARIF results daily at 00:00 UTC. - Rocky Linux: .github/workflows/build-rocky.yml builds Rocky 8/9/10 images with appropriate repositories enabled (
powertoolsfor 8,crbfor 9/10) and runs Trivy. - Fedora: .github/workflows/build-fedora.yml builds the latest Fedora image and scans with Trivy.
Artifacts are pushed to ghcr.io/<owner>/devcontainer-rhelyeah:*.
Run pre-commit locally or inside the container to keep formatting and lint checks aligned:
pre-commit run -a- [2024-08-03]: Removed support for RHEL7 images as VS Code is unsupported on it.
This project is licensed under the terms of the LICENSE file.