From f48a3b2ffea859c01d163ed9886b8ef76b30298e Mon Sep 17 00:00:00 2001 From: jordan Date: Sat, 7 Feb 2026 06:37:33 +0000 Subject: [PATCH] fix: add go mod download before build --- services/auth-svc/Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/services/auth-svc/Dockerfile b/services/auth-svc/Dockerfile index 88e72b6..ba76b9d 100644 --- a/services/auth-svc/Dockerfile +++ b/services/auth-svc/Dockerfile @@ -14,6 +14,10 @@ WORKDIR /app COPY pkg/ ./pkg/ COPY services/auth-svc/ ./services/auth-svc/ +# Download dependencies (populates go.sum if empty) +RUN cd pkg && go mod download +RUN cd services/auth-svc && go mod download + # Build from the service directory (uses replace directive for ../pkg) RUN cd services/auth-svc && CGO_ENABLED=0 go build -o /auth-svc ./cmd/server