From 05c69bc89b1a02da245baa041902f9f2ae692c14 Mon Sep 17 00:00:00 2001 From: Ben Vincent Date: Sat, 30 Nov 2024 23:34:31 +1100 Subject: [PATCH] feat: update buildrunner - add nfpm package - prepare for golang builds - cleanup layers in docker --- Dockerfile | 13 +++++++------ Makefile | 3 +++ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0d637c7..5c4a1b6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,17 +1,18 @@ # Start with the AlmaLinux 8.10 base image FROM git.query.consul/unkin/almalinux8:latest -# Clean and update the repository cache -RUN dnf clean all && \ - dnf makecache - # Install nodejs:20 for actions RUN dnf module enable -y nodejs:20 && \ dnf install -y nodejs -# Install build-essential +# Install build tools and dependencies for building RPMs RUN dnf groupinstall -y 'Development Tools' && \ - dnf install -y make cmake gcc gcc-c++ rpm rpmdevtools wget + dnf install -y make cmake gcc gcc-c++ rpm rpmdevtools wget tar gzip go + +# Install nfpm using the RPM package +ARG NFPM_VERSION +ENV NFPM_VERSION=${NFPM_VERSION} +RUN dnf install -y https://github.com/goreleaser/nfpm/releases/download/v${NFPM_VERSION}/nfpm-${NFPM_VERSION}-1.x86_64.rpm # Cleanup RUN dnf clean all && \ diff --git a/Makefile b/Makefile index 5ffa99e..e294fd2 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,6 @@ +# Set the nfpm version to install +NFPM_VERSION := 2.41.1 + # Get the current Git commit hash GIT_COMMIT := $(shell git rev-parse --short HEAD)