rpmbuilder/Dockerfile
Ben Vincent 182641132a
All checks were successful
Build / build-8 (pull_request) Successful in 8s
Build / build-9 (pull_request) Successful in 9s
refactor: modernise RPM builder with Python tooling v2
- Migrate from legacy shell-based build system to modern Python tooling
- Update all metadata.yaml files to new schema with per-distro builds
- Standardise build scripts with curl -L, envsubst, and error handling
- Convert nfpm.yaml templates to use environment variable substitution
- Update Dockerfile to accept all package metadata as build arguments
- Modernise Makefile to use new Python build tool commands
- Update CI workflow to use tools/build instead of make
2025-11-30 20:27:05 +11:00

34 lines
947 B
Docker

ARG BASE_IMAGE=git.unkin.net/unkin/almalinux9-rpmbuilder:latest
FROM ${BASE_IMAGE}
# Create output directory for RPMs
RUN mkdir -p /app/dist
# Set working directory
WORKDIR /app
# Accept all package metadata as build arguments and set as environment variables
ARG PACKAGE_NAME
ENV PACKAGE_NAME=${PACKAGE_NAME}
ARG PACKAGE_VERSION
ENV PACKAGE_VERSION=${PACKAGE_VERSION}
ARG PACKAGE_RELEASE
ENV PACKAGE_RELEASE=${PACKAGE_RELEASE}
ARG PACKAGE_DESCRIPTION
ENV PACKAGE_DESCRIPTION=${PACKAGE_DESCRIPTION}
ARG PACKAGE_MAINTAINER
ENV PACKAGE_MAINTAINER=${PACKAGE_MAINTAINER}
ARG PACKAGE_HOMEPAGE
ENV PACKAGE_HOMEPAGE=${PACKAGE_HOMEPAGE}
ARG PACKAGE_LICENSE
ENV PACKAGE_LICENSE=${PACKAGE_LICENSE}
ARG PACKAGE_ARCH
ENV PACKAGE_ARCH=${PACKAGE_ARCH}
ARG PACKAGE_PLATFORM
ENV PACKAGE_PLATFORM=${PACKAGE_PLATFORM}
# Copy resources from the context into the container
COPY resources /app/resources
# Default command to build RPMs
CMD /app/resources/build.sh