From cdad2277141ae4d86900e31610499ab901130545 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mariusz=20Be=C5=82towski?= Date: Wed, 30 Oct 2019 23:36:51 +0100 Subject: [PATCH] Add Dockerfile --- .dockerignore | 1 + Dockerfile | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..6b8710a7 --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +.git diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..86bfce8d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,24 @@ +FROM alpine:3.10.3 AS base + +FROM base AS builder + +RUN apk add --no-cache build-base make cmake + +WORKDIR /randomx + +COPY CMakeLists.txt . +COPY src ./src + +WORKDIR /randomx/build + +RUN cmake -DARCH=native .. + +RUN make + +FROM base + +RUN apk add --no-cache libstdc++ + +COPY --from=builder /randomx/build/randomx-benchmark . + +ENTRYPOINT ["./randomx-benchmark"]