From 07ec53acd7cfba193293be61e70c9ffcda9a5efb Mon Sep 17 00:00:00 2001 From: jabuxas Date: Fri, 6 Sep 2024 10:33:57 -0300 Subject: [PATCH] feat: optimize docker image --- Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 5bfc011..10aa210 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.23 +FROM golang:1.23 AS builder WORKDIR /app @@ -11,4 +11,8 @@ COPY *.go ./ RUN CGO_ENABLED=0 GOOS=linux go build -o /abyss +FROM scratch + +COPY --from=builder /abyss /abyss + CMD ["/abyss"]