mirror of
https://github.com/shenxn/protonmail-bridge-docker.git
synced 2025-12-06 08:27:08 +00:00
add env variables!
This commit is contained in:
parent
b874fa9b03
commit
18040d4b41
@ -8,7 +8,7 @@ WORKDIR /build/
|
|||||||
COPY build.sh VERSION /build/
|
COPY build.sh VERSION /build/
|
||||||
RUN bash build.sh
|
RUN bash build.sh
|
||||||
|
|
||||||
FROM debian:sid
|
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
|
# These are only exported if running as root
|
||||||
@ -18,9 +18,12 @@ EXPOSE 143/tcp
|
|||||||
EXPOSE 2025/tcp
|
EXPOSE 2025/tcp
|
||||||
EXPOSE 2143/tcp
|
EXPOSE 2143/tcp
|
||||||
|
|
||||||
|
ENV PROTONMAIL_TelemetryDisabled=false
|
||||||
|
ENV PROTONMAIL_AutoUpdate=false
|
||||||
|
|
||||||
# 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 procps socat pass libsecret-1-0 ca-certificates \
|
&& apt-get install -y --no-install-recommends procps jq socat pass libsecret-1-0 ca-certificates \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Copy bash scripts
|
# Copy bash scripts
|
||||||
|
|||||||
@ -54,6 +54,18 @@ else
|
|||||||
socat TCP-LISTEN:2025,fork TCP:127.0.0.1:1025 &
|
socat TCP-LISTEN:2025,fork TCP:127.0.0.1:1025 &
|
||||||
socat TCP-LISTEN:2143,fork TCP:127.0.0.1:1143 &
|
socat TCP-LISTEN:2143,fork TCP:127.0.0.1:1143 &
|
||||||
|
|
||||||
|
# check if the vault-editor can read the config
|
||||||
|
/protonmail/vault-editor read 2>&1 1>/dev/null
|
||||||
|
# Modify the protonmail config with env variables and expected values
|
||||||
|
/protonmail/vault-editor read | \
|
||||||
|
jq '.Settings.AutoUpdate = env.PROTONMAIL_AutoUpdate
|
||||||
|
| .Settings.TelemetryDisabled = env.PROTONMAIL_TelemetryDisabled
|
||||||
|
| .Settings.GluonDir |= "\(env.HOME)/.local/share/protonmail/bridge-v3/gluon"
|
||||||
|
| .Settings.Autostart = false
|
||||||
|
| .Settings.SMTPPort = 1025
|
||||||
|
| .Settings.IMAPPort = 1143 ' \
|
||||||
|
| /protonmail/vault-editor write
|
||||||
|
|
||||||
# Start protonmail
|
# Start protonmail
|
||||||
/protonmail/proton-bridge --noninteractive $@
|
/protonmail/proton-bridge --noninteractive $@
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user