add dbus and allow to find key for pass
Build and Push Docker Container / build-and-push (push) Successful in 5m11s

This commit is contained in:
GitHub Actions
2026-03-11 08:54:34 +01:00
parent beb667517c
commit 8123e4b288
2 changed files with 16 additions and 4 deletions
+5 -1
View File
@@ -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/
+11 -3
View File
@@ -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.