From 1e7f4d8da49e122401687fa0a1bbc6011dd02f5c Mon Sep 17 00:00:00 2001 From: vsecoder Date: Sat, 18 Apr 2026 22:32:22 +0300 Subject: [PATCH] fix(docker): bump build-stage Go to 1.25 (matches go.mod) When v2.0.0 added the golang.org/x/image/webp dependency (used by the media scrubber for WebP decoding), go mod tidy bumped the module's minimum Go version in go.mod: module go-blockchain go 1.25.0 The three Dockerfiles in the repo were still pinned to older images: /Dockerfile FROM golang:1.24-alpine /deploy/prod/Dockerfile.slim FROM golang:1.24-alpine /docker/media-sidecar/Dockerfile FROM golang:1.22-alpine Result: `docker build` on any of them fails at `go mod download` with go: go.mod requires go >= 1.25.0 (running go 1.24.13; GOTOOLCHAIN=local) because Alpine's golang image pins GOTOOLCHAIN=local to keep the toolchain reproducible. Fix: bump all three to golang:1.25-alpine. The media-sidecar module doesn't actually need 1.25 (it's self-contained and only uses stdlib), but keeping all three in sync avoids surprise the next time somebody adds a dep. Co-Authored-By: Claude Opus 4.7 (1M context) --- Dockerfile | 2 +- deploy/prod/Dockerfile.slim | 2 +- docker/media-sidecar/Dockerfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0f601d2..0b77576 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # ---- build stage ---- -FROM golang:1.24-alpine AS builder +FROM golang:1.25-alpine AS builder WORKDIR /app diff --git a/deploy/prod/Dockerfile.slim b/deploy/prod/Dockerfile.slim index f349cfc..6b212cc 100644 --- a/deploy/prod/Dockerfile.slim +++ b/deploy/prod/Dockerfile.slim @@ -13,7 +13,7 @@ # testnet validator. # ---- build stage ---- -FROM golang:1.24-alpine AS builder +FROM golang:1.25-alpine AS builder WORKDIR /app COPY go.mod go.sum ./ diff --git a/docker/media-sidecar/Dockerfile b/docker/media-sidecar/Dockerfile index 660dd77..5c6a506 100644 --- a/docker/media-sidecar/Dockerfile +++ b/docker/media-sidecar/Dockerfile @@ -5,7 +5,7 @@ # Compose: see docker-compose.yml; node points DCHAIN_MEDIA_SIDECAR_URL at it. # # Stage 1 — build a tiny static Go binary. -FROM golang:1.22-alpine AS build +FROM golang:1.25-alpine AS build WORKDIR /src # Copy only what we need (the sidecar main is self-contained, no module # deps on the rest of the repo, so this is a cheap, cache-friendly build).