1
0

Changed the Dockerfile to a multi-stage build process (to reduce size massively)

This commit is contained in:
BlueFox 2024-09-21 17:11:56 +02:00
parent f66a7c6370
commit 3b81501f01

View File

@ -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"]