chore: add go.sum to version control and copy in Dockerfile
Add empty go.sum file (no external dependencies yet) and update the Dockerfile build stage to COPY go.sum alongside go.mod for reproducible module downloads. This ensures the Docker build does not fail when Go requires go.sum to be present. Closes leeworks-agents/gitea-mobile#203 Closes leeworks-agents/gitea-mobile#180 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
# Stage 1: Build
|
# Stage 1: Build
|
||||||
FROM golang:1.22-alpine AS builder
|
FROM golang:1.22-alpine AS builder
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY go.mod ./
|
COPY go.mod go.sum ./
|
||||||
RUN go mod download
|
RUN go mod download
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o /gitea-mobile ./cmd/server
|
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o /gitea-mobile ./cmd/server
|
||||||
|
|||||||
Reference in New Issue
Block a user