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