diff --git a/Dockerfile b/Dockerfile index d00f857..ea7987a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,11 +6,11 @@ WORKDIR /app # Install build dependencies RUN apk add --no-cache git ca-certificates -# Copy all files first so Go has full package context +# Copy all source files COPY . . -# Tidy and download dependencies with full visibility to resolve any checksum discrepancies -RUN go mod tidy && go mod download +# Remove any outdated/corrupted go.sum and let Go regenerate a pristine, valid one +RUN rm -f go.sum && go mod tidy && go mod download # Build the application RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o blogging-cms .