diff --git a/Dockerfile b/Dockerfile index d26a90b..fa70957 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,18 +5,14 @@ ARG TARGETARCH WORKDIR /workspace # Copy the Go Modules manifests -COPY go.mod go.mod +COPY go.mod go.mod ./ COPY go.sum go.sum # cache deps before building and copying source so that we don't need to re-download as much # and so that source changes don't invalidate our downloaded layer RUN go mod download -# Copy the go source -COPY cmd/main.go cmd/main.go -COPY api/ api/ -COPY internal/controller/ internal/controller/ -COPY cloud/ cloud/ -COPY util/ util/ +# Copy the sources +COPY ./ ./ # Build # the GOARCH has not a default value to allow the binary be built according to the host where the command