From d9a0c9bdc765a2df5f621ce196d4cf34fd35ef30 Mon Sep 17 00:00:00 2001 From: Luis Pater Date: Mon, 8 Jun 2026 11:03:46 +0800 Subject: [PATCH] chore(build): migrate from Alpine to Debian and update build dependencies - Updated `Dockerfile` base images from `golang:1.26-alpine` and `alpine:3.23` to `golang:1.26-bookworm` and `debian:bookworm`. - Replaced `apk` with `apt-get` for dependency installation. - Added `buildvcs=false` flag to Go build command for enhanced reproducibility. --- Dockerfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index a666b5a07..1f9fed85b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,8 @@ -FROM golang:1.26-alpine AS builder +FROM golang:1.26-bookworm AS builder WORKDIR /app -RUN apk add --no-cache build-base +RUN apt-get update && apt-get install -y --no-install-recommends build-essential git && rm -rf /var/lib/apt/lists/* COPY go.mod go.sum ./ @@ -14,11 +14,11 @@ ARG VERSION=dev ARG COMMIT=none ARG BUILD_DATE=unknown -RUN CGO_ENABLED=1 GOOS=linux go build -ldflags="-s -w -X 'main.Version=${VERSION}' -X 'main.Commit=${COMMIT}' -X 'main.BuildDate=${BUILD_DATE}'" -o ./CLIProxyAPI ./cmd/server/ +RUN CGO_ENABLED=1 GOOS=linux go build -buildvcs=false -ldflags="-s -w -X 'main.Version=${VERSION}' -X 'main.Commit=${COMMIT}' -X 'main.BuildDate=${BUILD_DATE}'" -o ./CLIProxyAPI ./cmd/server/ -FROM alpine:3.23 +FROM debian:bookworm -RUN apk add --no-cache tzdata +RUN apt-get update && apt-get install -y --no-install-recommends tzdata && rm -rf /var/lib/apt/lists/* RUN mkdir /CLIProxyAPI