Skip to content

Commit a00035a

Browse files
geroplona-agent
andcommitted
Remove all stale Go artifacts when upgrading Go version
Also remove /home/gitpod/go (GOPATH with pre-compiled module cache) in addition to the build cache. The golangci-lint go install was finding stale .a files compiled with go1.24.9. Co-authored-by: Ona <no-reply@ona.com>
1 parent 9ee0174 commit a00035a

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

dev/image/Dockerfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,11 @@ USER root
1212
# Pin Go version explicitly to ensure all CI-built binaries use a
1313
# non-vulnerable toolchain (CVE-2025-68121 requires >= 1.24.13).
1414
ENV GO_VERSION=1.24.13
15-
RUN rm -rf /usr/local/go \
15+
RUN rm -rf /usr/local/go /home/gitpod/go /home/gitpod/.cache/go-build \
1616
&& curl -fsSL "https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz" | tar -C /usr/local -xz \
1717
&& ln -sf /usr/local/go/bin/go /usr/bin/go \
18-
&& ln -sf /usr/local/go/bin/gofmt /usr/bin/gofmt \
19-
&& go clean -cache \
20-
&& rm -rf /home/gitpod/.cache/go-build
18+
&& ln -sf /usr/local/go/bin/gofmt /usr/bin/gofmt
19+
ENV GOROOT=/usr/local/go
2120
ENV PATH=/usr/local/go/bin:$PATH
2221

2322
### cloud_sql_proxy ###

0 commit comments

Comments
 (0)