diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..381bdb6 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,5 @@ +** + +!/share +!/src +!/CMakeLists.txt diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..ec52ffb --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ +FROM alpine:3.9 as build + +WORKDIR /usr/src/minisign + +RUN apk add --no-cache \ + g++==8.3.0-r0 \ + libsodium-dev==1.0.16-r0 + +COPY ./ ./ + +RUN gcc -static -Os -s -o minisign src/*.c -lsodium + + +FROM scratch + +COPY --from=build /usr/src/minisign/minisign /usr/local/bin/ + +ENTRYPOINT ["/usr/local/bin/minisign"] diff --git a/README.md b/README.md index c808e38..692a4b1 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,10 @@ Minisign is also available on Ubuntu as a PPA: $ [sudo] add-apt-repository ppa:dysfunctionalprogramming/minisign +Minisign is also available with docker: + + $ docker run -i --rm jedisct1/minisign + Additional tools, libraries and implementations -----------------------------------------------