From 8820afb5edfbe8d7dcded4477748825edb73e653 Mon Sep 17 00:00:00 2001 From: Kurt Werle Date: Wed, 24 Feb 2021 13:15:49 -0800 Subject: [PATCH] Add dockerfile for client --- .dockerignore | 1 + Dockerfile.client | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile.client diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..d193b16d --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +Dockerfile.client diff --git a/Dockerfile.client b/Dockerfile.client new file mode 100644 index 00000000..e2ae6d3c --- /dev/null +++ b/Dockerfile.client @@ -0,0 +1,31 @@ +# docker build -t fwknop -f Dockerfile.client . +# docker run -v $HOME/.fwknoprc:/root/.fwknoprc --rm fwknop +FROM alpine AS build + +RUN apk add autoconf gcc automake libtool make musl-dev libpcap texinfo + +RUN mkdir /src + +WORKDIR /src + +COPY . . + +# https://github.com/mrash/fwknop/issues/305 +# ENV CFLAGS="-fcommon" + +RUN autoreconf -fvi + +RUN ./configure --disable-server CFLAGS="-fcommon" +RUN make +RUN make install + +######################## + +FROM alpine:latest +# The wget that is installed does not support --secure-protocol! +RUN apk add wget +COPY --from=build /usr/local/bin/fwknop /usr/local/bin/fwknop +COPY --from=build /usr/local/lib/libfko* /usr/local/lib/ + + +ENTRYPOINT [ "/usr/local/bin/fwknop" ]