From 2a01eda564bef06bf7142d062b7e5b57559774e3 Mon Sep 17 00:00:00 2001 From: Jannis R Date: Wed, 2 Dec 2020 13:53:29 +0100 Subject: [PATCH] add Dockerfile & .dockerignore --- .dockerignore | 3 +++ Dockerfile | 25 +++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..7904451 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,3 @@ +/build + +/Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..5012f35 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,25 @@ +FROM debian:buster-slim AS builder + +WORKDIR /app + +RUN apt-get update && \ + apt-get install -y g++ cmake git + +ADD . /app +RUN mkdir build && \ + cd build && \ + cmake .. && \ + make -j && \ + pwd && \ + make install + +FROM debian:buster-slim + +RUN apt-get update && \ + apt-get install -y libgomp1 && \ + rm -rf /var/lib/apt/lists/* + +COPY --from=builder /usr/local/etc/pfaedle /usr/local/etc/pfaedle +COPY --from=builder /usr/local/bin/pfaedle /usr/local/bin/pfaedle + +ENTRYPOINT ["/usr/local/bin/pfaedle"]