fix: use Go 1.25.5 with custom Docker build stage

Download Go 1.25.5 directly in Dockerfile since official images don't exist yet.
This commit is contained in:
Zach Kelling
2025-12-10 19:37:53 -08:00
parent 9aeb05ba49
commit 15ee9d8232
2 changed files with 22 additions and 5 deletions
+21 -4
View File
@@ -1,8 +1,25 @@
# Build stage
FROM golang:1.23.4-bookworm AS builder
# Build stage - Install Go 1.25.5 from source
FROM debian:bookworm-slim AS go-installer
RUN apt-get update && apt-get install -y --no-install-recommends \
git make gcc libc6-dev bash \
wget ca-certificates \
&& rm -rf /var/lib/apt/lists/*
ARG GO_VERSION=1.25.5
ARG TARGETARCH
RUN wget -q "https://go.dev/dl/go${GO_VERSION}.linux-${TARGETARCH}.tar.gz" \
&& tar -C /usr/local -xzf "go${GO_VERSION}.linux-${TARGETARCH}.tar.gz" \
&& rm "go${GO_VERSION}.linux-${TARGETARCH}.tar.gz"
# Build stage
FROM debian:bookworm-slim AS builder
COPY --from=go-installer /usr/local/go /usr/local/go
ENV PATH="/usr/local/go/bin:${PATH}"
RUN apt-get update && apt-get install -y --no-install-recommends \
git make gcc libc6-dev \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /build
@@ -37,4 +54,4 @@ USER netrunner
EXPOSE 8080 8081
ENTRYPOINT ["/usr/local/bin/netrunner"]
ENTRYPOINT ["/usr/local/bin/netrunner"]
+1 -1
View File
@@ -1,6 +1,6 @@
module github.com/luxfi/netrunner
go 1.23.4
go 1.25.5
exclude google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1