From ddcb7d998201a38851d59968d58852af052fbf1a Mon Sep 17 00:00:00 2001 From: hoodad <25026962+hoodadt@users.noreply.github.com> Date: Mon, 21 Jul 2025 11:46:29 +0000 Subject: [PATCH] Better Dockerfile --- contrib/Dockerfile | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/contrib/Dockerfile b/contrib/Dockerfile index c20a1d6..01916ce 100644 --- a/contrib/Dockerfile +++ b/contrib/Dockerfile @@ -1,17 +1,22 @@ -FROM debian:stable +FROM alpine:3.22.1 AS builder -# Base -RUN apt-get update && apt-get install -y \ - build-essential \ +RUN apk add --no-cache \ + build-base \ automake \ autoconf \ - m4 + m4 \ + git -# Add source code COPY ./ /app - -# Compile WORKDIR /app -RUN autoreconf --install -RUN ./configure && make && make install -ENTRYPOINT ["fping"] \ No newline at end of file +RUN autoreconf --install && ./configure && make + +FROM alpine:3.22.1 + +LABEL org.opencontainers.image.title="fping" \ + org.opencontainers.image.description="High performance ping tool " \ + org.opencontainers.image.source="https://github.com/schweikert/fping" \ + +COPY --from=builder /app/src/fping /usr/local/bin/fping + +ENTRYPOINT ["fping"] -- 2.43.0