pmb-pf/Dockerfile

46 lines
1.3 KiB
Docker
Raw Normal View History

2024-07-07 23:08:08 +00:00
FROM alpine:3 as bridgebuild
2024-07-07 22:03:26 +00:00
#MAINTAINER Juan Luis Baptiste juan.baptiste@gmail.com
MAINTAINER finn git@hot.oily.dad
2015-04-20 05:07:23 +00:00
2024-07-07 23:08:08 +00:00
# ProtonMailBridge Build
RUN apk add make go pkgconfig libsecret libsecret-dev git bash
WORKDIR /
RUN git clone https://github.com/ProtonMail/proton-bridge.git pmb
WORKDIR /pmb
RUN echo "BUILDING BRIDGE"
RUN make build-nogui
#Postfix email relay service
FROM alpine:3
RUN apk update && \
apk add bash gawk cyrus-sasl cyrus-sasl-login cyrus-sasl-crammd5 mailx \
postfix && \
2024-07-07 23:08:08 +00:00
apk add libsecret gpg gpg-agent pass msmtp && \
rm -rf /var/cache/apk/* && \
mkdir -p /var/log/supervisor/ /var/run/supervisor/ && \
sed -i -e 's/inet_interfaces = localhost/inet_interfaces = all/g' /etc/postfix/main.cf
2024-07-07 17:12:32 +00:00
# Gpg for pass/pmb
2024-07-07 20:16:12 +00:00
ARG GPG_PP=""
RUN echo "@@@@@@@@@@@@@@@@@@@@ Passphrase:"${GPG_PP}
2024-07-07 17:12:32 +00:00
RUN mkdir /root/.gnupg
#RUN echo "default-cache-ttl 34560000" >> /root/.gnupg/gpg-agent.conf
#RUN echo "max-cache-ttl 34560000" >> /root/.gnupg/gpg-agent.conf
RUN gpg-agent --daemon --batch --disable-scdaemon
2024-07-07 20:16:12 +00:00
RUN gpg --quick-gen-key --batch --passphrase "${GPG_PP}" pmbkey
2024-07-07 17:12:32 +00:00
RUN pass init pmbkey
2024-07-07 17:46:37 +00:00
COPY dotmsmtprc /root/.msmtprc
2015-04-20 05:07:23 +00:00
COPY run.sh /
RUN chmod +x /run.sh
2015-05-12 07:20:38 +00:00
RUN newaliases
2015-04-20 05:07:23 +00:00
2024-07-07 23:08:08 +00:00
# pmb
COPY --from=bridgebuild /pmb /pmb
2024-07-07 17:46:37 +00:00
WORKDIR pmb
2024-07-07 17:12:32 +00:00
2015-04-20 05:07:23 +00:00
EXPOSE 25
#ENTRYPOINT ["/run.sh"]
2019-11-29 10:44:46 +00:00
CMD ["/run.sh"]