Update Dockerfile
This commit is contained in:
+3
-3
@@ -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 .
|
||||
|
||||
Reference in New Issue
Block a user