From 51bfa9a300f0d552e5f041d35b35be94b300ba8a Mon Sep 17 00:00:00 2001 From: loweel Date: Sun, 28 Sep 2025 16:01:23 +0200 Subject: [PATCH] Dockerfile at al --- Dockerfile | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index dc32900..ce09022 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,17 +1,14 @@ # ====== STAGE 1: build ====== -FROM golang:1.22-alpine AS builder +FROM golang:latest AS builder # Installa tool utili per mod e certs (git, ca) -RUN apk add --no-cache git ca-certificates +RUN apt install git ca-certificates -y WORKDIR /src -# Copia i mod per cache dei deps -COPY go.mod go.sum ./ -RUN go mod download - -# Copia il resto del sorgente COPY . . +RUN go mod tidy ; go mod vendor + # Compila binario statico e snello ENV CGO_ENABLED=0