From f3b90ba30ed5deb5314a7b3f9befc01bac29386b Mon Sep 17 00:00:00 2001 From: Manu Garg Date: Mon, 9 Nov 2026 23:17:18 -0800 Subject: [PATCH] Dockerfile: drop git and g++, pass VERSION to make git was only there for `git describe`, which can't work in the build stage since only src/ is copied in, so pactester in the image reported an empty version. Pass the existing VERSION build arg to make instead. Dropping git also drops its perl dependency, whose packages have been intermittently 404ing on security.ubuntu.com and failing the amd64 image build. g++ isn't needed (everything is C); install without recommends and add libc6-dev explicitly. --- Dockerfile | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index d1c92972..7b5ecc88 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,17 +1,18 @@ # Use Ubuntu as the base image FROM ubuntu:latest AS build-stage -# Install build dependencies -RUN apt-get update && apt-get install -y \ +# Install build dependencies. git isn't needed: only src/ is copied in, so +# the version comes from the VERSION build arg instead of git describe. +RUN apt-get update && apt-get install -y --no-install-recommends \ gcc \ - git \ - g++ \ - bash \ - make + libc6-dev \ + make \ + && rm -rf /var/lib/apt/lists/* +ARG VERSION WORKDIR /build COPY src /build -RUN make pactester +RUN make pactester VERSION=$VERSION # Final stage FROM ubuntu:latest