From af7c1caf98e49b54eca014400bd6a3cf5db41bc7 Mon Sep 17 00:00:00 2001 From: Lokowitz Date: Sun, 31 Aug 2025 11:19:16 +0000 Subject: [PATCH] changed docker image from ubuntu to alpine --- Dockerfile | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index d156d1a..8b94de3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,18 +16,13 @@ COPY . . RUN CGO_ENABLED=0 GOOS=linux go build -o /gerbil # Start a new stage from scratch -FROM ubuntu:24.04 AS runner +FROM alpine:3.22 AS runner -RUN apt-get update && apt-get install -y iptables iproute2 && rm -rf /var/lib/apt/lists/* +RUN apk add --no-cache iptables iproute2 -# Copy the pre-built binary file from the previous stage and the entrypoint script COPY --from=builder /gerbil /usr/local/bin/ COPY entrypoint.sh / RUN chmod +x /entrypoint.sh - -# Copy the entrypoint script ENTRYPOINT ["/entrypoint.sh"] - -# Command to run the executable CMD ["gerbil"] \ No newline at end of file