Files
GitHub Actions 8bf274ff69
Build and Push Docker Container / build-and-push (push) Successful in 7m1s
fix: force patched nogui bridge binary to bind on 0.0.0.0
- Install patched nogui bridge as both /usr/bin/bridge and /usr/bin/proton-bridge

- Give copied binaries explicit target names for clarity

- Remove persisted auto-update dir so upstream 127.0.0.1 binary is not used

- Run bridge from /usr/bin via new BRIDGE_BIN variable

- Kill both bridge and proton-bridge process names on init

Prevents Proton auto-updates from reverting IMAP/SMTP to loopback-only.
2026-07-01 16:38:10 +02:00

47 lines
1.4 KiB
Docker

FROM golang:trixie AS build
ARG VERSION
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
libsecret-1-dev \
libfido2-dev \
libcbor-dev \
pass \
&& rm -rf /var/lib/apt/lists/*
# 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
FROM debian:trixie-slim
EXPOSE 1025/tcp
EXPOSE 1143/tcp
# Install dependencies and protonmail bridge
RUN apt-get update && apt-get install -y --no-install-recommends \
gnupg \
pass \
libsecret-1-0 \
libfido2-1 \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# Copy bash scripts
COPY gpgparams entrypoint.sh /protonmail/
COPY scripts/generate_new_certs.sh /root/generate_new_certs.sh
WORKDIR /protonmail/
# 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
ENTRYPOINT ["bash", "/protonmail/entrypoint.sh"]