A minimalistic password vault based on GnuPG and pass
1.1K
The purpose of this image is to provide a secure-enough solution for fetching passwords out of an encrypted storage.
Create a cointainer e.g. by using Docker or podman:
docker run --name pass-storage -v ./config:/config -d docker.io/gbeine/pass:latest
podman run --name pass-storage -v ./config:/config -d docker.io/gbeine/pass:latest
The container does not require network access and does not provide any ports.
Then create a GnuPG key by running:
podman exec -it pass-storage gpg --full-generate-key
And afterwards create the password store by running and replace your-key-id with the e-mail address used for the generated gpg key:
podman exec pass-storage pass init your-key-id
To add passwords to the store run:
podman exec -it pass-storage pass add path/key
To open the container (the gpg-agent session) for password retrieval run:
podman exec -it pass-storage pass ls
Use this after a reboot or a session timeout.
As the gpg key password is requested, the -it is required.
To retrieve passwords from the store run:
podman exec pass-storage pass path/key
The image is based on LinuxServer.io's Alpine Linux base image. It uses gpg-agent to create a session which stays active for 48 hours.
Containers are configured using parameters passed at runtime (such as those above). These parameters are separated by a colon and indicate <external>:<internal> respectively. For example, -p 8080:80 would expose port 80 from inside the container to be accessible from the host's IP on port 8080 outside the container.
| Parameter | Function |
|---|---|
-e PUID=1000 | for UserID - see below for explanation |
-e PGID=1000 | for GroupID - see below for explanation |
-e TZ=Etc/UTC | specify a timezone to use, see this list. |
-v /config | Persistent config files |
--read-only=true | Run container with a read-only filesystem. Please read the docs. |
When using volumes (-v flags), permissions issues can arise between the host OS and the container, we avoid this issue by allowing you to specify the user PUID and group PGID.
Ensure any volume directories on the host are owned by the same user you specify and any permissions issues will vanish like magic.
In this instance PUID=1000 and PGID=1000, to find yours use id your_user as below:
id your_user
Example output:
uid=1000(your_user) gid=1000(your_user) groups=1000(your_user)
Content type
Image
Digest
sha256:e585211d9…
Size
21 MB
Last updated
about 1 year ago
docker pull gbeine/pass