1
0
docker-cmatrix/Dockerfile

29 lines
828 B
Docker

# image for building the binary from source
FROM alpine AS cmatrixbuildimage
LABEL org.opencontainers.image.authors="bluefox@privacynerd.de"
WORKDIR /cmatrix
RUN apk update --no-cache && \
apk add --no-cache git autoconf automake alpine-sdk ncurses-dev ncurses-static && \
git clone https://git.privacynerd.de/Mirrors/cmatrix.git . && \
autoreconf -i && \
mkdir -p /usr/lib/kbd/consolefonts /usr/share/consolefonts && \
./configure LDFLAGS="-static" && \
make
# final cmatrix Container Image
FROM alpine
LABEL org.opencontainers.image.authors="bluefox@privacynerd.de"
RUN apk update --no-cache && \
apk add --no-cache ncurses-terminfo-base && \
adduser -g "cmatrix" -s /usr/sbin/nologin -D -H cmatrix
COPY --from=cmatrixbuildimage /cmatrix/cmatrix /cmatrix
USER cmatrix
CMD ["./cmatrix"]