Browse Source

fix: Dockerfile standalone (#5797)

Signed-off-by: Gustavo Carvalho <gustavo.carvalho@container-solutions.com>
Gustavo Fernandes de Carvalho 3 months ago
parent
commit
7b160ce01f
1 changed files with 1 additions and 4 deletions
  1. 1 4
      Dockerfile.standalone

+ 1 - 4
Dockerfile.standalone

@@ -8,13 +8,10 @@ ARG TARGETOS
 ARG TARGETARCH
 ARG TARGETARCH
 ENV CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH}
 ENV CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH}
 WORKDIR /app
 WORKDIR /app
-# Avoid invalidating the `go mod download` cache when only code has changed.
-COPY go.mod go.sum /app/
-RUN go mod download
 COPY . /app/
 COPY . /app/
+RUN go mod download
 RUN go build -o external-secrets main.go
 RUN go build -o external-secrets main.go
 
 
-
 FROM gcr.io/distroless/static@sha256:4b2a093ef4649bccd586625090a3c668b254cfe180dee54f4c94f3e9bd7e381e AS app
 FROM gcr.io/distroless/static@sha256:4b2a093ef4649bccd586625090a3c668b254cfe180dee54f4c94f3e9bd7e381e AS app
 COPY --from=builder /app/external-secrets /bin/external-secrets
 COPY --from=builder /app/external-secrets /bin/external-secrets