From: hoodad <25026962+hoodadt@users.noreply.github.com> Date: Mon, 21 Jul 2025 11:46:29 +0000 (+0000) Subject: Better Dockerfile X-Git-Url: https://git.gsnw.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ddcb7d998201a38851d59968d58852af052fbf1a;p=fping.git Better Dockerfile --- 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"]