35 lines
849 B
Docker
35 lines
849 B
Docker
# Build the ProtonMail Bridge.
|
|
FROM golang:1.14-alpine as build
|
|
ENV LANG C.UTF-8
|
|
RUN apk add --no-cache \
|
|
gcc \
|
|
git \
|
|
libsecret-dev \
|
|
make \
|
|
musl-dev
|
|
WORKDIR /usr/src
|
|
|
|
ARG TAG
|
|
RUN git clone https://github.com/ProtonMail/proton-bridge.git proton-bridge \
|
|
&& cd proton-bridge \
|
|
&& if [ -n "$TAG" ]; then git checkout tags/$TAG; fi \
|
|
&& make build-nogui
|
|
|
|
# Create a container for the ProtonMail Bridge.
|
|
FROM alpine:edge
|
|
ENV LANG C.UTF-8
|
|
COPY --from=build /usr/src/proton-bridge/Desktop-Bridge /bin/protonmail-bridge
|
|
RUN apk add --no-cache \
|
|
libsecret \
|
|
pass \
|
|
socat \
|
|
su-exec
|
|
COPY entrypoint /bin/
|
|
RUN chmod +x /bin/entrypoint
|
|
COPY initproton /bin/
|
|
RUN chmod +x /bin/initproton
|
|
WORKDIR /var/lib/proton
|
|
EXPOSE 25/tcp
|
|
EXPOSE 143/tcp
|
|
ENTRYPOINT ["/bin/entrypoint"]
|
|
CMD ["/bin/initproton"]
|