12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- FROM alpine:3.11 as download
- RUN apk add --no-cache git
- # https://github.com/mikecardwell/gpgit/compare/master...EtiennePerot:master
- ARG GPGIT_CLONE_URL=https://github.com/EtiennePerot/gpgit.git
- ARG GPGIT_REVISION=e9432412f2eb6aca77fb4e7bb6fad41fcbfd8632
- RUN git clone "$GPGIT_CLONE_URL" /tmp/gpgit \
- && cd /tmp/gpgit \
- && git checkout "$GPGIT_REVISION" \
- && ls -la
- FROM alpine:3.11 as service
- ARG CPANM_PACKAGE_VERSION=1.7044-r1
- ARG GNUPG_PACKAGE_VERSION=2.2.19-r0
- # ARG PERL_MIME_VERSION=3.031-r1
- ARG SOCAT_PACKAGE_VERSION=1.7.3.3-r1
- ARG TINI_PACKAGE_VERSION=0.18.0-r0
- ENV GNUPGHOME=/gnupg_home
- RUN apk add --no-cache \
- gnupg=$GNUPG_PACKAGE_VERSION \
- perl-app-cpanminus=$CPANM_PACKAGE_VERSION \
- socat=$SOCAT_PACKAGE_VERSION \
- tini=$TINI_PACKAGE_VERSION \
- && adduser -S gpgit \
- && mkdir -p "$GNUPGHOME" \
- && chown gpgit "$GNUPGHOME" \
- && chmod 700 "$GNUPGHOME"
- VOLUME $GNUPGHOME
- ARG PERL_MAIL_GNUPG_VERSION=0.23
- ARG PERL_MAIL_GNUPG_BUILD_PKGS="\
- gcc \
- libc-dev \
- make \
- perl-dev \
- perl-module-build \
- perl-test-deep \
- perl-test-leaktrace \
- wget"
- RUN apk add --no-cache \
- $PERL_MAIL_GNUPG_BUILD_PKGS \
- perl-capture-tiny \
- perl-class-tiny \
- perl-mailtools \
- perl-moo \
- perl-moox-types-mooselike \
- perl-role-tiny \
- perl-strictures \
- perl-sub-quote \
- perl-test-requires \
- perl-try-tiny \
- perl-type-tiny \
- && echo TODO merge
- RUN apk add --no-cache perl-mime-tools
- RUN apk add --no-cache perl-list-moreutils
- RUN apk add --no-cache \
- perl-scalar-list-utils \
- perl-sub-uplevel \
- perl-test-exception \
- perl-test-fatal \
- perl-test-output
- RUN apk add --no-cache perl-scalar-list-utils
- RUN echo TODO merge \
- && (cpanm --notest Mail::GnuPG@$PERL_MAIL_GNUPG_VERSION \
- || (cat /root/.cpanm/work/*/build.log; exit 1)) \
- && apk del $PERL_MAIL_GNUPG_BUILD_PKGS
- ARG GPGIT_PATH=/usr/local/bin/gpgit
- COPY --from=download /tmp/gpgit/gpgit $GPGIT_PATH
- ENV GNUPG_IMPORT=""
- ENTRYPOINT ["tini", "--"]
- COPY serve-gpgit.sh /
- RUN chmod a+rx /serve-gpgit.sh
- USER gpgit
- # [string.ascii_lowercase.index(c) for c in 'gpgit']
- EXPOSE 6156/tcp
- # log level: notice
- ENV RECIPIENTS="gpgit@dev.null"
- CMD ["/serve-gpgit.sh"]
|