Changed the Dockerfile to a multi-stage build process (to reduce size massively)
This commit is contained in:
parent
f66a7c6370
commit
3b81501f01
15
Dockerfile
15
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"
|
LABEL org.opencontainers.image.authors="bluefox@privacynerd.de"
|
||||||
|
|
||||||
WORKDIR cmatrix
|
WORKDIR /cmatrix
|
||||||
|
|
||||||
RUN apk update && \
|
RUN apk update && \
|
||||||
apk add git autoconf automake alpine-sdk ncurses-dev ncurses-static && \
|
apk add git autoconf automake alpine-sdk ncurses-dev ncurses-static && \
|
||||||
@ -13,3 +14,13 @@ RUN apk update && \
|
|||||||
make
|
make
|
||||||
|
|
||||||
CMD ["./cmatrix"]
|
CMD ["./cmatrix"]
|
||||||
|
|
||||||
|
|
||||||
|
# final cmatrix Container Image
|
||||||
|
FROM alpine
|
||||||
|
|
||||||
|
LABEL org.opencontainers.image.authors="bluefox@privacynerd.de"
|
||||||
|
|
||||||
|
COPY --from=cmatrixbuildimage /cmatrix/cmatrix /cmatrix
|
||||||
|
|
||||||
|
CMD [".cmatrix"]
|
||||||
|
Loading…
Reference in New Issue
Block a user