2026-03-11 15:03:11 +01:00
|
|
|
FROM golang:trixie AS build
|
2020-06-01 06:51:24 -07:00
|
|
|
|
2025-10-14 16:36:30 +02:00
|
|
|
ARG VERSION
|
2025-04-24 23:03:50 +02:00
|
|
|
|
2026-03-11 15:48:55 +01:00
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
2026-03-11 15:03:11 +01:00
|
|
|
build-essential \
|
|
|
|
|
libsecret-1-dev \
|
2026-03-10 07:50:58 +01:00
|
|
|
libfido2-dev \
|
2026-03-11 15:03:11 +01:00
|
|
|
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
|
2026-03-11 07:00:17 +01:00
|
|
|
ADD https://github.com/ProtonMail/proton-bridge.git#${VERSION} /build/proton-bridge/
|
|
|
|
|
WORKDIR /build/proton-bridge/
|
2026-03-11 06:39:41 +01:00
|
|
|
RUN sed -i 's/127.0.0.1/0.0.0.0/g' internal/constants/constants.go
|
2026-03-11 07:57:24 +01:00
|
|
|
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
|
|
|
|
2026-03-11 06:39:41 +01: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 \
|
2026-03-11 15:03:11 +01:00
|
|
|
libsecret-1-0 \
|
|
|
|
|
libfido2-1 \
|
2026-03-11 08:54:34 +01:00
|
|
|
ca-certificates \
|
2026-03-11 15:03:11 +01:00
|
|
|
&& 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
|
2026-03-11 07:22:31 +01:00
|
|
|
WORKDIR /protonmail/
|
2020-06-01 06:51:24 -07:00
|
|
|
|
2026-07-01 16:38:10 +02: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"]
|