From 4b845ce39a56dab73e741194174bd18ddaf04c9d Mon Sep 17 00:00:00 2001 From: Kevin Hannon Date: Fri, 24 Jan 2025 16:59:34 -0500 Subject: [PATCH] copy all files in project rather than piece by piece --- Dockerfile | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) 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