diff --git a/Dockerfile b/Dockerfile index c059a0960..f4991687d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,18 +6,8 @@ FROM --platform=${BUILDPLATFORM} ${BUILDER_IMAGE} AS builder ARG TARGETARCH WORKDIR /workspace -# Copy the Go Modules manifests -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 main.go main.go -COPY api/ api/ -COPY pkg/ pkg/ +COPY . . # Build # the GOARCH has not a default value to allow the binary be built according to the host where the command # was called. For example, if we call make docker-build in a local env which has the Apple Silicon M1 SO