cleanup entrypoint.sh and add haveged for getentropy
Build and Push Docker Container / build-and-push (push) Successful in 5m50s

This commit is contained in:
GitHub Actions
2026-03-11 09:30:04 +01:00
parent ebce5c4f8d
commit 2ca2b80ff4
2 changed files with 14 additions and 17 deletions
+3 -1
View File
@@ -29,7 +29,9 @@ RUN apk add --no-cache \
pass \ pass \
ca-certificates \ ca-certificates \
dbus \ dbus \
dbus-x11 dbus-x11 \
gnome-keyring \
haveged
# Copy bash scripts # Copy bash scripts
COPY gpgparams entrypoint.sh /protonmail/ COPY gpgparams entrypoint.sh /protonmail/
+11 -16
View File
@@ -1,18 +1,20 @@
#!/bin/bash #!/bin/bash
set -ex set -ex
# Start DBus session for libsecret # start entropy
haveged -w 1024 &
# start dbus
eval $(dbus-launch --sh-syntax) eval $(dbus-launch --sh-syntax)
# start secret service
export $(gnome-keyring-daemon --start --components=secrets)
chmod 700 /root/.gnupg || true
# Initialize # Initialize
if [[ $1 == init ]]; then if [[ $1 == init ]]; then
# Initialize pass
gpg --generate-key --batch /protonmail/gpgparams gpg --generate-key --batch /protonmail/gpgparams
# Change Permission when Folder Exists
if [ -d "/root/.gnupg" ]; then
chmod 700 /root/.gnupg
fi
KEY=$(gpg --list-secret-keys --with-colons | awk -F: '/^sec:/ {print $5; exit}') KEY=$(gpg --list-secret-keys --with-colons | awk -F: '/^sec:/ {print $5; exit}')
pass init "$KEY" pass init "$KEY"
@@ -23,19 +25,12 @@ if [[ $1 == init ]]; then
# || true to make sure this would not fail in case there is no running instance. # || true to make sure this would not fail in case there is no running instance.
pkill protonmail-bridge || true pkill protonmail-bridge || true
# Login # Run any ProtonMail Bridge Command - Login
proton-bridge --cli $@ proton-bridge --cli $@
else else
# Change Permission when Folder Exists # Start ProtonMail Bridge
if [ -d "/root/.gnupg" ]; then
chmod 700 /root/.gnupg
fi
# Start protonmail
# 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 | proton-bridge --cli $@ cat faketty | proton-bridge --cli $@
fi fi