Files

47 lines
1.4 KiB
Docker
Raw Permalink Normal View History

FROM golang:trixie AS build
2020-06-01 06:51:24 -07:00
ARG VERSION
2026-03-11 15:48:55 +01:00
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
libsecret-1-dev \
2026-03-10 07:50:58 +01:00
libfido2-dev \
libcbor-dev \
2026-03-11 15:48:55 +01:00
pass \
&& rm -rf /var/lib/apt/lists/*
2020-06-01 06:51:24 -07:00
# Build
ADD https://github.com/ProtonMail/proton-bridge.git#${VERSION} /build/proton-bridge/
WORKDIR /build/proton-bridge/
RUN sed -i 's/127.0.0.1/0.0.0.0/g' internal/constants/constants.go
RUN make build-nogui vault-editor
2020-06-01 06:51:24 -07:00
2026-03-11 15:48:55 +01:00
FROM debian:trixie-slim
2020-06-01 06:51:24 -07:00
EXPOSE 1025/tcp
EXPOSE 1143/tcp
2020-06-01 06:51:24 -07:00
# Install dependencies and protonmail bridge
2026-03-11 15:48:55 +01:00
RUN apt-get update && apt-get install -y --no-install-recommends \
2026-03-11 08:54:34 +01:00
gnupg \
pass \
libsecret-1-0 \
libfido2-1 \
2026-03-11 08:54:34 +01:00
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
2020-06-01 06:51:24 -07:00
# Copy bash scripts
COPY gpgparams entrypoint.sh /protonmail/
2026-03-11 16:12:46 +01:00
COPY scripts/generate_new_certs.sh /root/generate_new_certs.sh
WORKDIR /protonmail/
2020-06-01 06:51:24 -07:00
# Copy Proton Mail Bridge.
# Important: use the patched nogui `bridge` binary as both executable names.
# The upstream `proton-bridge` launcher can auto-update into an official binary
# that still binds IMAP/SMTP to 127.0.0.1, bypassing our 0.0.0.0 patch.
COPY --from=build /build/proton-bridge/bridge /usr/bin/bridge
COPY --from=build /build/proton-bridge/bridge /usr/bin/proton-bridge
COPY --from=build /build/proton-bridge/vault-editor /usr/bin/vault-editor
2020-06-01 06:51:24 -07:00
ENTRYPOINT ["bash", "/protonmail/entrypoint.sh"]