From 6d93fd0a5ef027e8cee3f733d466689ffcf9f472 Mon Sep 17 00:00:00 2001 From: Sebastian Gaviria Tangarife <61520057+SGT911@users.noreply.github.com> Date: Sun, 9 Jan 2022 14:21:07 -0500 Subject: [PATCH] Update Dockerfile Add support to other container CLIs and minify image removing the building packages --- contrib/docker/Dockerfile | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/contrib/docker/Dockerfile b/contrib/docker/Dockerfile index 97aaac3..aa9e8af 100644 --- a/contrib/docker/Dockerfile +++ b/contrib/docker/Dockerfile @@ -1,21 +1,25 @@ -FROM alpine:3.12.0 - -LABEL maintainer="sstefin@bk.ru" +# Add "docker.io/library/" for support to buildah and podman +FROM docker.io/library/alpine:3.14 AS build #Installing all the dependencies RUN apk add --no-cache gcc libsodium-dev make autoconf build-base WORKDIR /mkp224o - -COPY . /mkp224o/ +COPY . . RUN ./autogen.sh \ && ./configure \ - && make \ - && cp /mkp224o/mkp224o /usr/local/bin/ + && make + +# Multiple staging build for smaller size +FROM docker.io/library/alpine:3.14 AS dist +LABEL maintainer="sstefin@bk.ru" + +RUN apk add --no-cache libsodium + +COPY --from=build /mkp224o/mkp224o /usr/bin/mkp224o VOLUME /root/data - WORKDIR /root/data -ENTRYPOINT ["mkp224o"] +ENTRYPOINT ["/usr/bin/mkp224o"]