]> git.gsnw.org Git - fping.git/commitdiff
Better Dockerfile
authorhoodad <25026962+hoodadt@users.noreply.github.com>
Mon, 21 Jul 2025 11:46:29 +0000 (11:46 +0000)
committerErik Auerswald <auerswal@unix-ag.uni-kl.de>
Sat, 2 Aug 2025 12:00:26 +0000 (14:00 +0200)
contrib/Dockerfile

index c20a1d68956118d3a183c938af0c91b9bb53d927..01916cedfee1271e6cb102651cc54562c866f3d4 100644 (file)
@@ -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"]