diff --git a/backend/Dockerfile b/backend/Dockerfile index be163d6..6cc08dc 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -7,13 +7,12 @@ 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 /backend diff --git a/worker/Dockerfile b/worker/Dockerfile index 82305db..8a8c493 100644 --- a/worker/Dockerfile +++ b/worker/Dockerfile @@ -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