Created
September 4, 2025 17:48
-
-
Save t1m0thyj/84b2d246e649dfe0bdda0273df31dee0 to your computer and use it in GitHub Desktop.
Demo of using `password-store` instead of `gnome-keyring-daemon` to store Zowe CLI credentials
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM node:lts-slim | |
| RUN apt-get update && \ | |
| apt-get install -y --no-install-recommends ca-certificates dbus gpg libsecret-1-0 pass procps wget && \ | |
| apt-get clean | |
| RUN wget -O /usr/local/bin/pass-secret-service https://github.com/grimsteel/pass-secret-service/releases/download/v0.5.0/pass-secret-service-$(uname -m) && \ | |
| chmod +x /usr/local/bin/pass-secret-service | |
| RUN npm install -g @zowe/cli && \ | |
| npm cache clean --force | |
| RUN gpg --batch --pinentry-mode loopback --passphrase "" --quick-generate-key "Zowe <[email protected]>" rsa4096 encr && \ | |
| gpg_key_id=$(gpg --list-keys --with-colons | grep '^pub' | cut -d':' -f5) && \ | |
| pass init "$gpg_key_id" | |
| RUN echo '\n\ | |
| # Ensure D-Bus session bus exists\n\ | |
| if [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then\n\ | |
| export DBUS_SESSION_BUS_ADDRESS=$(dbus-daemon --session --print-address --fork)\n\ | |
| fi\n\ | |
| \n\ | |
| # Start pass-secret-service if not already running\n\ | |
| if ! pgrep -u "$(whoami)" -f pass-secret-service >/dev/null; then\n\ | |
| nohup pass-secret-service >/dev/null 2>&1 &\n\ | |
| fi\n' >> /root/.profile | |
| CMD ["/bin/bash", "-l"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment