From 342cafed0efbf7d4773da86995a47101c7c76800 Mon Sep 17 00:00:00 2001 From: Arunavo Ray Date: Sun, 15 Mar 2026 09:35:50 +0530 Subject: [PATCH] fix: force Go 1.25.8 toolchain and update x/crypto for git-lfs build The git-lfs go.mod contains a `toolchain go1.25.3` directive which causes Go to auto-download and use Go 1.25.3 instead of our installed 1.25.8. Set GOTOOLCHAIN=local to force using the installed version. Also update golang.org/x/crypto to latest before building to resolve CVE-2025-47913 (needs >= 0.43.0, was pinned at 0.36.0). --- Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index c795a33..48325f2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -37,9 +37,13 @@ RUN ARCH="$(dpkg --print-architecture)" \ && wget -qO /tmp/go.tar.gz "https://go.dev/dl/go${GO_VERSION}.linux-${ARCH}.tar.gz" \ && tar -C /usr/local -xzf /tmp/go.tar.gz \ && rm /tmp/go.tar.gz -ENV PATH="/usr/local/go/bin:${PATH}" +ENV PATH="/usr/local/go/bin:/root/go/bin:${PATH}" +# Force using our installed Go (not the version in go.mod toolchain directive) +ENV GOTOOLCHAIN=local RUN git clone --branch "v${GIT_LFS_VERSION}" --depth 1 https://github.com/git-lfs/git-lfs.git /tmp/git-lfs \ && cd /tmp/git-lfs \ + && go get golang.org/x/crypto@latest \ + && go mod tidy \ && make \ && install -m 755 /tmp/git-lfs/bin/git-lfs /usr/local/bin/git-lfs