mirror of
https://github.com/luxfi/netrunner.git
synced 2026-07-27 00:04:23 +00:00
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:
+21
-4
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user