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:07:29 +00:00
parent 852613586f
commit 0dfea9b2a2
+6 -5
View File
@@ -6,11 +6,12 @@ WORKDIR /app
# Install build dependencies
RUN apk add --no-cache git ca-certificates
# Copy go mod files
COPY go.mod go.sum ./
# Copy go mod files safely handling missing or mismatched sum files
COPY go.mod ./
COPY go.sum* ./
# Download dependencies
RUN go mod download
# Automatically tidy modules and download dependencies to prevent checksum errors
RUN go mod tidy && go mod download
# Copy source code
COPY . .
@@ -45,4 +46,4 @@ EXPOSE 8080
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD wget --quiet --tries=1 --spider http://localhost:8080/ || exit 1
CMD ["./blogging-cms"]
CMD ["./blogging-cms"]