Skip to content

Commit

Permalink
Dockerfile: install git to populate node version string
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
awly committed Sep 4, 2024
1 parent 08da6ba commit 2f607af
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 2f607af

Please sign in to comment.