From 3b81501f01801be8c095325fb6f5f7a36a7dfd3b Mon Sep 17 00:00:00 2001 From: BlueFox Date: Sat, 21 Sep 2024 17:11:56 +0200 Subject: [PATCH] Changed the Dockerfile to a multi-stage build process (to reduce size massively) --- Dockerfile | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index df038e2..710d7c6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,9 @@ -FROM alpine +# image for building the binary from source +FROM alpine AS cmatrixbuildimage LABEL org.opencontainers.image.authors="bluefox@privacynerd.de" -WORKDIR cmatrix +WORKDIR /cmatrix RUN apk update && \ apk add git autoconf automake alpine-sdk ncurses-dev ncurses-static && \ @@ -13,3 +14,13 @@ RUN apk update && \ make CMD ["./cmatrix"] + + +# final cmatrix Container Image +FROM alpine + +LABEL org.opencontainers.image.authors="bluefox@privacynerd.de" + +COPY --from=cmatrixbuildimage /cmatrix/cmatrix /cmatrix + +CMD [".cmatrix"]