From b280e45e5b0e16e087445917b4c1adcdffff4b34 Mon Sep 17 00:00:00 2001 From: Ethan Shold Date: Mon, 8 Jul 2024 20:29:53 -0500 Subject: [PATCH] scratch image --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 46803fa..0fe0fc7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,11 +11,11 @@ RUN go mod download # Copy the source code COPY . ./ -# Build the application +# Build the application with static linking RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags="-s -w" -o adguard-exporter . -# Create a minimal Alpine image -FROM alpine:3.20 +# Create a scratch image +FROM scratch WORKDIR /app