Skip to content

Commit a99a585

Browse files
committed
Reduce image size
1 parent 801ac8a commit a99a585

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

resource/Dockerfile

+8-7
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1-
FROM debian AS builder
2-
RUN apt-get update && apt-get install -y cmake git g++ libtbb-dev libmpfr-dev libgmp-dev
1+
FROM alpine:3 AS builder
2+
3+
RUN apk add make cmake git g++ onetbb-dev mpfr-dev gmp-dev
4+
35
RUN git clone --depth 1 https://github.com/TLCFEM/vpmr.git
46
WORKDIR /vpmr
5-
RUN git submodule update --init --recursive
6-
RUN cd eigen && git apply --ignore-space-change --ignore-whitespace ../patch_size.patch && cd ..
7-
RUN mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release .. && make
7+
RUN git submodule update --init --recursive && cd eigen && git apply --ignore-space-change --ignore-whitespace ../patch_size.patch && cd .. && mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release .. && make
88

9-
FROM debian AS runtime
10-
RUN apt-get update && apt-get install -y libtbb12 libmpfr6 libgmp10 && apt-get clean -y
9+
FROM alpine:3 AS runtime
10+
RUN apk add onetbb mpfr
1111
COPY --from=builder /vpmr/build/vpmr /usr/bin/vpmr
12+
1213
ENTRYPOINT ["/usr/bin/vpmr"]
1314
CMD ["-h"]

0 commit comments

Comments
 (0)