From b9628e5c608c3ff56011a5094aec687ef00503f0 Mon Sep 17 00:00:00 2001 From: nutshell9247 Date: Sat, 8 Aug 2026 07:09:07 +0000 Subject: [PATCH] Update Dockerfile --- Dockerfile | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 229b445..d00f857 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,16 +6,12 @@ WORKDIR /app # Install build dependencies RUN apk add --no-cache git ca-certificates -# Copy go mod files safely handling missing or mismatched sum files -COPY go.mod ./ -COPY go.sum* ./ - -# Automatically tidy modules and download dependencies to prevent checksum errors -RUN go mod tidy && go mod download - -# Copy source code +# Copy all files first so Go has full package context COPY . . +# Tidy and download dependencies with full visibility to resolve any checksum discrepancies +RUN go mod tidy && go mod download + # Build the application RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o blogging-cms .