2024-09-21 15:11:56 +00:00
|
|
|
# image for building the binary from source
|
|
|
|
FROM alpine AS cmatrixbuildimage
|
2024-09-21 14:36:49 +00:00
|
|
|
|
2024-09-21 15:05:12 +00:00
|
|
|
LABEL org.opencontainers.image.authors="bluefox@privacynerd.de"
|
2024-09-21 14:36:49 +00:00
|
|
|
|
2024-09-21 15:11:56 +00:00
|
|
|
WORKDIR /cmatrix
|
2024-09-21 14:55:19 +00:00
|
|
|
|
2024-09-21 15:17:41 +00:00
|
|
|
RUN apk update --no-cache && \
|
|
|
|
apk add --no-cache git autoconf automake alpine-sdk ncurses-dev ncurses-static && \
|
2024-09-21 15:01:55 +00:00
|
|
|
git clone https://git.privacynerd.de/Mirrors/cmatrix.git . && \
|
|
|
|
autoreconf -i && \
|
|
|
|
mkdir -p /usr/lib/kbd/consolefonts /usr/share/consolefonts && \
|
|
|
|
./configure LDFLAGS="-static" && \
|
|
|
|
make
|
2024-09-21 14:36:49 +00:00
|
|
|
|
2024-09-21 15:11:56 +00:00
|
|
|
|
|
|
|
# final cmatrix Container Image
|
|
|
|
FROM alpine
|
|
|
|
|
|
|
|
LABEL org.opencontainers.image.authors="bluefox@privacynerd.de"
|
|
|
|
|
2024-09-21 15:28:05 +00:00
|
|
|
RUN apk update --no-cache && \
|
|
|
|
apk add --no-cache ncurses-terminfo-base && \
|
|
|
|
adduser -g "cmatrix" -s /usr/sbin/nologin -D -H cmatrix
|
2024-09-21 15:11:56 +00:00
|
|
|
COPY --from=cmatrixbuildimage /cmatrix/cmatrix /cmatrix
|
|
|
|
|
2024-09-21 15:28:05 +00:00
|
|
|
USER cmatrix
|
2024-09-21 15:38:03 +00:00
|
|
|
ENTRYPOINT ["./cmatrix"]
|
|
|
|
CMD ["-akb", "-u 3"]
|