From 6855522a4093c521fdbdde5e994764d13e0c4b54 Mon Sep 17 00:00:00 2001
From: Cyril Levis <git@levis.name>
Date: Thu, 22 Aug 2024 14:18:07 +0200
Subject: [PATCH] chore: test 1.24.0-rc1

---
 Dockerfile | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/Dockerfile b/Dockerfile
index c96d23236..e6e50648b 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,10 +1,18 @@
+FROM golang:1.22 AS golangbuild
+ARG TARGETARCH
+WORKDIR /usr/src/app
+COPY go.mod go.sum ./
+RUN go mod download && go mod verify
+COPY . .
+RUN make
+
 # This builder stage it's only because we need a command
 # to create a symlink and reduce the size of the image
 FROM gcr.io/distroless/static-debian12:debug-nonroot AS builder
 ARG TARGETARCH
 
 SHELL ["/busybox/sh", "-c"]
-COPY --chown=nonroot:nonroot --chmod=0755 dist/manager/* bin/
+COPY --from=golangbuild --chown=nonroot:nonroot --chmod=0755 /usr/src/app/bin/manager bin/manager
 RUN ln -sf bin/manager_${TARGETARCH} manager
 
 FROM gcr.io/distroless/static-debian12:nonroot
-- 
GitLab