FROM golang AS build RUN apt-get update && apt-get install -y git build-essential libsecret-1-dev WORKDIR /build/ RUN git clone --depth 1 --branch v3.9.1 https://github.com/ProtonMail/proton-bridge.git WORKDIR /build/proton-bridge RUN find . -type f -exec sed -i 's/127.0.0.1/0.0.0.0/g' {} + RUN make build-nogui FROM ubuntu:jammy EXPOSE 25/tcp EXPOSE 143/tcp RUN apt-get update \ && apt-get install -y --no-install-recommends pass socat libsecret-1-0 ca-certificates \ && rm -rf /var/lib/apt/lists/* COPY gpgparams entrypoint.sh /protonmail/ COPY --from=build /build/proton-bridge/bridge /protonmail/ COPY --from=build /build/proton-bridge/proton-bridge /protonmail/ ENTRYPOINT ["bash", "/protonmail/entrypoint.sh"]