Update Dockerfile

Add support to other container CLIs and minify image removing the building packages
This commit is contained in:
Sebastian Gaviria Tangarife 2022-01-09 14:21:07 -05:00 committed by GitHub
parent 1e18c10a11
commit 6d93fd0a5e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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