From 8123e4b2884a053742cfba7c90c31952dcc7c3a2 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Wed, 11 Mar 2026 08:54:34 +0100 Subject: [PATCH] add dbus and allow to find key for pass --- build/Dockerfile | 6 +++++- build/entrypoint.sh | 14 +++++++++++--- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/build/Dockerfile b/build/Dockerfile index 36053a9..1635773 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -25,7 +25,11 @@ RUN apk add --no-cache \ gcompat \ libsecret \ libfido2 \ - gnupg pass ca-certificates + gnupg \ + pass \ + ca-certificates \ + dbus \ + dbus-x11 # Copy bash scripts COPY gpgparams entrypoint.sh /protonmail/ diff --git a/build/entrypoint.sh b/build/entrypoint.sh index ec3f25b..d64eb2a 100644 --- a/build/entrypoint.sh +++ b/build/entrypoint.sh @@ -1,14 +1,22 @@ #!/bin/bash - set -ex +# Start DBus session for libsecret +eval $(dbus-launch --sh-syntax) + # Initialize if [[ $1 == init ]]; then # Initialize pass gpg --generate-key --batch /protonmail/gpgparams - pass init pass-key - + # 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}') + pass init "$KEY" + # 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.