🐛 fix: Move WORKDIR before COPY in Dockerfile.build
This commit is contained in:
@@ -32,12 +32,12 @@ RUN go install github.com/swaggo/swag/cmd/swag@latest && \
|
||||
go install golang.org/x/tools/cmd/goimports@latest && \
|
||||
go install honnef.co/go/tools/cmd/staticcheck@latest
|
||||
|
||||
# Simple build environment - source code is mounted at runtime
|
||||
WORKDIR /build
|
||||
|
||||
# Copy only go.mod and go.sum first for dependency caching
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download && go mod verify
|
||||
|
||||
# Simple build environment - source code is mounted at runtime
|
||||
WORKDIR /build
|
||||
|
||||
# Pre-download common Go tools (already installed in base)
|
||||
# RUN go install github.com/swaggo/swag/cmd/swag@latest
|
||||
Reference in New Issue
Block a user