mirror of
https://github.com/keven1024/015.git
synced 2026-05-26 07:08:02 +00:00
fix: update Dockerfile to copy all source files for backend and worker services, improving build context
This commit is contained in:
@@ -7,12 +7,13 @@ WORKDIR /app
|
||||
|
||||
# Download Go modules
|
||||
COPY go.mod go.sum ./
|
||||
# Copy the source code. Note the slash at the end, as explained in
|
||||
# https://docs.docker.com/engine/reference/builder/#copy
|
||||
COPY *.go ./
|
||||
|
||||
RUN go env -w GO111MODULE=on && go env -w GOPROXY=https://goproxy.cn,direct && go mod download
|
||||
|
||||
# Copy the source code. Note the slash at the end, as explained in
|
||||
# https://docs.docker.com/engine/reference/builder/#copy
|
||||
COPY . .
|
||||
|
||||
# Build
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -o /worker
|
||||
|
||||
|
||||
Reference in New Issue
Block a user