From 3bb77df714d3155006e864b1b9feabdb2a16f4ee Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Thu, 29 May 2025 16:51:55 -0400 Subject: [PATCH] Dockerfile: New to build on a bootc image This is a pretty straightforward wiring up of the `make rpm` flow and then installing it in a bootc container image. Intended as a starting point both for local development but also wiring up further CI. Signed-off-by: Colin Walters --- .dockerignore | 2 ++ .github/workflows/docker-build.yml | 22 ++++++++++++++++++++++ Dockerfile | 30 ++++++++++++++++++++++++++++++ 3 files changed, 54 insertions(+) create mode 100644 .dockerignore create mode 100644 .github/workflows/docker-build.yml create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..e479086 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +# Avoid rebuilding when this changes +Dockerfile diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml new file mode 100644 index 0000000..9aaa9f1 --- /dev/null +++ b/.github/workflows/docker-build.yml @@ -0,0 +1,22 @@ +name: Docker Build + +on: + workflow_dispatch: + pull_request: + branches: [ "main" ] + +jobs: + build: + runs-on: ubuntu-24.04 + steps: + - name: Get a newer podman for heredoc support (from debian testing) + run: | + set -eux + echo 'deb [trusted=yes] https://ftp.debian.org/debian/ testing main' | sudo tee /etc/apt/sources.list.d/testing.list + sudo apt update + sudo apt install -y crun/testing podman/testing skopeo/testing + + - uses: actions/checkout@v4 + + - name: Build container + run: sudo podman build -t localhost/tuned . diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..fd7ac95 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,30 @@ +ARG base=quay.io/centos-bootc/centos-bootc:stream10 + +FROM $base as build +COPY tuned.spec /tmp/tuned.spec +# This installs our package dependencies, and we want to cache it independently of the rest. +RUN <