mirror of
https://github.com/shenxn/protonmail-bridge-docker.git
synced 2026-03-26 21:35:58 +00:00
Make the bridge run inside tmux to allow for easy user interaction within the container
This commit is contained in:
parent
97014ae98c
commit
c9bec759ba
@ -19,7 +19,7 @@ EXPOSE 143/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 procps tmux \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Copy bash scripts
|
# Copy bash scripts
|
||||||
|
|||||||
@ -16,7 +16,11 @@ if [[ $1 == init ]]; then
|
|||||||
pkill protonmail-bridge || true
|
pkill protonmail-bridge || true
|
||||||
|
|
||||||
# Login
|
# Login
|
||||||
/protonmail/proton-bridge --cli $@
|
tmux new-session -d -s bridge-init "/protonmail/proton-bridge --cli $@"
|
||||||
|
echo "ProtonMail Bridge init running inside tmux session 'bridge-init'"
|
||||||
|
echo "Attach with: docker exec -it <container> tmux attach -t bridge-init"
|
||||||
|
|
||||||
|
sleep infinity
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
@ -30,6 +34,11 @@ else
|
|||||||
# Fake a terminal, so it does not quit because of EOF...
|
# Fake a terminal, so it does not quit because of EOF...
|
||||||
rm -f faketty
|
rm -f faketty
|
||||||
mkfifo faketty
|
mkfifo faketty
|
||||||
cat faketty | /protonmail/proton-bridge --cli $@
|
|
||||||
|
tmux new-session -d -s bridge "cat faketty | /protonmail/proton-bridge --cli $@"
|
||||||
|
echo "ProtonMail Bridge running inside tmux session 'bridge'"
|
||||||
|
echo "Attach with: docker exec -it <container> tmux attach -t bridge"
|
||||||
|
|
||||||
|
sleep infinity
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user