From d203c4ecc225c5235fd9d2b3b15e261deaf3487a Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Wed, 11 Mar 2026 09:48:14 +0100 Subject: [PATCH] test PROTONMAIL_KEYCHAIN variable --- build/Dockerfile | 21 +++++---------------- build/entrypoint.sh | 20 +++----------------- 2 files changed, 8 insertions(+), 33 deletions(-) diff --git a/build/Dockerfile b/build/Dockerfile index 4ce186e..515ba53 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -18,28 +18,17 @@ FROM alpine:latest EXPOSE 1025/tcp EXPOSE 1143/tcp -RUN mkdir -p /root/.gnupg && chmod 700 /root/.gnupg - -# Install dependencies and protonmail bridge RUN apk add --no-cache \ gcompat \ - libsecret \ - libfido2 \ - gnupg \ - pass \ - ca-certificates \ - dbus \ - dbus-x11 \ - gnome-keyring \ - haveged + ca-certificates -# Copy bash scripts -COPY gpgparams entrypoint.sh /protonmail/ -WORKDIR /protonmail/ +ENV PROTONMAIL_KEYCHAIN=file -# Copy protonmail COPY --from=build /build/proton-bridge/bridge /usr/bin/ COPY --from=build /build/proton-bridge/proton-bridge /usr/bin/ COPY --from=build /build/proton-bridge/vault-editor /usr/bin/ +COPY entrypoint.sh /protonmail/ +WORKDIR /protonmail/ + ENTRYPOINT ["bash", "/protonmail/entrypoint.sh"] diff --git a/build/entrypoint.sh b/build/entrypoint.sh index 160b7ca..57ca22e 100644 --- a/build/entrypoint.sh +++ b/build/entrypoint.sh @@ -1,24 +1,10 @@ #!/bin/bash -set -ex +set -e -# start entropy -haveged -w 1024 & - -# start dbus -eval $(dbus-launch --sh-syntax) - -# start secret service -export $(gnome-keyring-daemon --start --components=secrets) - -chmod 700 /root/.gnupg || true +mkdir -p /root/.config/protonmail # Initialize -if [[ $1 == init ]]; then - gpg --generate-key --batch /protonmail/gpgparams - - KEY=$(gpg --list-secret-keys --with-colons | awk -F: '/^sec:/ {print $5; exit}') - pass init "$KEY" - +if [[ $1 == "init" ]]; then # Kill the other instance as only one can be running at a time. # This allows users to run entrypoint init inside a running conainter # which is useful in a k8s environment.