Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/cd-rockylinux9-builder.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: CD for rockylinux9-builder

on:
push:
branches: ['main']
paths: ['rockylinux9-builder/**', '!**/*.md']

env:
REGISTRY: ghcr.io
IMAGE_NAME: urbdyn/rockylinux9-builder

jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: ./rockylinux9-builder
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
42 changes: 42 additions & 0 deletions .github/workflows/ci-rockylinux9-builder.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: CI for rockylinux9-builder

on:
pull_request:
branches: ['main']
paths: ['rockylinux9-builder/**', '!**/*.md']

env:
REGISTRY: ghcr.io
IMAGE_NAME: urbdyn/rockylinux9-builder

jobs:
build-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: read

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build Docker image
uses: docker/build-push-action@v4
with:
context: ./rockylinux9-builder
push: false
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ This repo is a collection of utilities for building software as used by Urban Dy
1. [centos7-devtoolset8-builder](./centos7-devtoolset8-builder/)
2. [centos7-rpm-builder](./centos7-rpm-builder/)
3. [rockylinux8-rpm-builder](./rockylinux8-rpm-builder/)
4. [rockylinux9-builder](./rockylinux9-builder/)
10 changes: 10 additions & 0 deletions rockylinux9-builder/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# This file builds an build image for Rocky Linux 9

# Using Rocky Linux 9.5 as base image (pulled on date 2025-03-03).
FROM docker.io/rockylinux/rockylinux@sha256:149fd31d916038eb1084d0e051537e279d7afcd5de0b365254e8fa3c3ef12bad

# Installing tools needed for builds
RUN dnf install -y which python3 epel-release && \
dnf groupinstall -y "Development Tools" && \
dnf install -y ccache && \
dnf clean all
26 changes: 26 additions & 0 deletions rockylinux9-builder/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# urbdyn/rockylinux9-builder

This is a Docker container for building binaries on Rocky Linux 9 using the standard `"Development Tools"` group install.

It has the benefit of providing all the needed boiler plate and avoiding the long waits in CI needed to install the full build `"Development Tools"` toolchain in a clean container.

Our recommended use of it is to build your own container with it to ensure you have any other dependencies you need.
To use to build something follow the below sections:

## Creating container with this container

```Dockerfile
FROM urbdyn/rockylinux9-builder:latest

# Install any needed packages here
# ...
```

## Running container

```bash
docker create -it \
--name "$container_builder_container" \
-v "$build_dir/:/TARGET_BUILD_DIR_HERE/" \
"$container_builder_image"
```