From 4fcd1be67c7dc736ea48fd7b7f33f74d78c84426 Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Fri, 12 Jul 2019 12:07:05 +0000 Subject: [PATCH] compile all implementations and add them to final image --- Dockerfile | 16 +++++++++------- matrix-build.sh | 12 ++++++++++++ 2 files changed, 21 insertions(+), 7 deletions(-) create mode 100755 matrix-build.sh diff --git a/Dockerfile b/Dockerfile index dcbcd30..838a306 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,16 +9,18 @@ RUN apk add --no-cache \ RUN git clone --depth=1 https://github.com/cathugger/mkp224o \ && cd mkp224o \ - && ./autogen.sh \ - && ./configure --enable-donna-sse2 \ - && sed -i 's/^\(CFLAGS= .*\)$/\1 -static/' Makefile \ - && make -j 4 \ - && strip mkp224o + && sed -i 's/^\(CFLAGS= .*\)$/\1 -static/' Makefile.in \ + && ./autogen.sh + +COPY matrix-build.sh . + +RUN cd mkp224o \ + && /matrix-build.sh FROM alpine RUN apk add --no-cache tini -COPY --from=builder /mkp224o/mkp224o . +COPY --from=builder /usr/local/bin /usr/local/bin -ENTRYPOINT ["tini", "--", "/mkp224o"] +ENTRYPOINT ["tini", "--", "/usr/local/bin/mkp224o-amd64-51-30k"] diff --git a/matrix-build.sh b/matrix-build.sh new file mode 100755 index 0000000..498feff --- /dev/null +++ b/matrix-build.sh @@ -0,0 +1,12 @@ +#!/bin/sh +set -e + +for implementation in ref10 amd64-51-30k amd64-64-24k donna donna-sse2; do + ./configure \ + --enable-${implementation} \ + --enable-binsearch=yes + make -j 4 + strip mkp224o + mv mkp224o /usr/local/bin/mkp224o-${implementation} + make clean +done