add dbus and allow to find key for pass
Build and Push Docker Container / build-and-push (push) Successful in 5m11s
Build and Push Docker Container / build-and-push (push) Successful in 5m11s
This commit is contained in:
+5
-1
@@ -25,7 +25,11 @@ RUN apk add --no-cache \
|
|||||||
gcompat \
|
gcompat \
|
||||||
libsecret \
|
libsecret \
|
||||||
libfido2 \
|
libfido2 \
|
||||||
gnupg pass ca-certificates
|
gnupg \
|
||||||
|
pass \
|
||||||
|
ca-certificates \
|
||||||
|
dbus \
|
||||||
|
dbus-x11
|
||||||
|
|
||||||
# Copy bash scripts
|
# Copy bash scripts
|
||||||
COPY gpgparams entrypoint.sh /protonmail/
|
COPY gpgparams entrypoint.sh /protonmail/
|
||||||
|
|||||||
+10
-2
@@ -1,13 +1,21 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
|
# Start DBus session for libsecret
|
||||||
|
eval $(dbus-launch --sh-syntax)
|
||||||
|
|
||||||
# Initialize
|
# Initialize
|
||||||
if [[ $1 == init ]]; then
|
if [[ $1 == init ]]; then
|
||||||
|
|
||||||
# Initialize pass
|
# Initialize pass
|
||||||
gpg --generate-key --batch /protonmail/gpgparams
|
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.
|
# Kill the other instance as only one can be running at a time.
|
||||||
# This allows users to run entrypoint init inside a running conainter
|
# This allows users to run entrypoint init inside a running conainter
|
||||||
|
|||||||
Reference in New Issue
Block a user