From 854eae0f607ccf9e724e7519854471cdd4483e1b Mon Sep 17 00:00:00 2001 From: Andrew Lytvynov Date: Wed, 4 Sep 2024 15:57:47 -0500 Subject: [PATCH] Dockerfile: install git to populate node version string (#141) Without the git CLI, `go build` will not produce the embedded VCS metadata that's used to report the commit hash in node version string. This fixes the `1.72.1-ERR-BuildInfo` version string reported to Tailscale. Fixes #140 Signed-off-by: Andrew Lytvynov --- Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Dockerfile b/Dockerfile index 58d104a..408f6d0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,6 +2,10 @@ FROM --platform=$BUILDPLATFORM golang:1.23-alpine as build WORKDIR /work +# Install git so that go build populates the VCS details in build info, which +# is then reported to Tailscale in the node version string. +RUN apk add git + COPY go.mod go.sum ./ RUN go mod download