Update Dockerfile
CI/CD Pipeline / Test & Lint (push) Waiting to run
CI/CD Pipeline / Build Docker Image (push) Blocked by required conditions
CI/CD Pipeline / Security Scan (push) Waiting to run

This commit is contained in:
2026-08-08 07:10:17 +00:00
parent b9628e5c60
commit 0429c9e069
+3 -3
View File
@@ -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 .