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
|
||||
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/*
|
||||
|
||||
# Copy bash scripts
|
||||
|
||||
@ -16,7 +16,11 @@ if [[ $1 == init ]]; then
|
||||
pkill protonmail-bridge || true
|
||||
|
||||
# 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
|
||||
|
||||
@ -30,6 +34,11 @@ else
|
||||
# Fake a terminal, so it does not quit because of EOF...
|
||||
rm -f 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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user