Skip to content

Dockerfile: drop git and g++, pass VERSION to make - #271

Merged
manugarg merged 1 commit into
mainfrom
docker-drop-git
Nov 10, 2026
Merged

manugarg merged 1 commit into
mainfrom
docker-drop-git

Conversation

@manugarg

Copy link
Copy Markdown
Owner

The amd64 Docker image build has been failing intermittently because security.ubuntu.com returns 404 for perl_5.40.1-7ubuntu0.4 and related packages (runs 42767683830 and the first attempt of 42771512584). Perl comes in only as a dependency of git.

git isn't needed. The build stage copies in only src/, so git describe can't work there, and as a result pactester -v in the published image prints an empty version.

Changes:

  • Drop git and g++; everything is C. Install with --no-install-recommends, adding libc6-dev (only recommended by gcc) explicitly. The build-stage install goes from pulling perl to 37 packages with no perl.
  • Pass the existing VERSION build arg to make pactester.

Testing:

  • docker build --build-arg VERSION=v1.5.4 . builds locally (amd64). pactester -v in the image prints v1.5.4, and -p <pac> -u <url> returns the expected proxy.
  • arm64 and arm/v7 are not tested locally; CI builds them only on pushes to main and on tags.

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.
@sonarqubecloud

Copy link
Copy Markdown

@manugarg
manugarg merged commit 83213f9 into main Nov 10, 2026
28 checks passed
@manugarg
manugarg deleted the docker-drop-git branch November 10, 2026 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant