mirror of
https://github.com/shenxn/protonmail-bridge-docker.git
synced 2025-12-06 08:27:08 +00:00
add (backwards compatible) support for running rootless
This commit is contained in:
parent
b3c8d67f74
commit
db779f4e52
@ -11,9 +11,13 @@ RUN bash build.sh
|
|||||||
FROM debian:sid-slim
|
FROM debian:sid-slim
|
||||||
LABEL maintainer="Xiaonan Shen <s@sxn.dev>"
|
LABEL maintainer="Xiaonan Shen <s@sxn.dev>"
|
||||||
|
|
||||||
|
# These are only exported if running as root
|
||||||
EXPOSE 25/tcp
|
EXPOSE 25/tcp
|
||||||
EXPOSE 143/tcp
|
EXPOSE 143/tcp
|
||||||
|
|
||||||
|
EXPOSE 1025/tcp
|
||||||
|
EXPOSE 1143/tcp
|
||||||
|
|
||||||
# Install dependencies and protonmail bridge
|
# Install dependencies and protonmail bridge
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y --no-install-recommends socat pass libsecret-1-0 ca-certificates \
|
&& apt-get install -y --no-install-recommends socat pass libsecret-1-0 ca-certificates \
|
||||||
|
|||||||
@ -23,8 +23,13 @@ else
|
|||||||
# socat will make the conn appear to come from 127.0.0.1
|
# socat will make the conn appear to come from 127.0.0.1
|
||||||
# ProtonMail Bridge currently expects that.
|
# ProtonMail Bridge currently expects that.
|
||||||
# It also allows us to bind to the real ports :)
|
# It also allows us to bind to the real ports :)
|
||||||
socat TCP-LISTEN:25,fork TCP:127.0.0.1:1025 &
|
if [[ $(id -u) == 0 ]]; then
|
||||||
socat TCP-LISTEN:143,fork TCP:127.0.0.1:1143 &
|
socat TCP-LISTEN:25,fork TCP:127.0.0.1:1025 &
|
||||||
|
socat TCP-LISTEN:143,fork TCP:127.0.0.1:1143 &
|
||||||
|
fi
|
||||||
|
|
||||||
|
socat TCP-LISTEN:1025,fork TCP:127.0.0.1:1025 &
|
||||||
|
socat TCP-LISTEN:1143,fork TCP:127.0.0.1:1143 &
|
||||||
|
|
||||||
# Start protonmail
|
# Start protonmail
|
||||||
# Fake a terminal, so it does not quit because of EOF...
|
# Fake a terminal, so it does not quit because of EOF...
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user