Keepass2 in Docker based on Alpine Linux 3.3
1.8K
To run it locally:
Before running it make sure the mounted keepass folder exists.
sudo docker run --rm -it \
--net=none \
-v ~/.Xauthority:/root/.Xauthority \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-v $HOME/keepass:/home/user/keepass \
-e DISPLAY=unix$DISPLAY \
zburgermeiszter/keepass2
To run it on a remote docker host:
ssh -XCt user@host \
sudo docker run --rm -it \
--net=none \
-v ~/.Xauthority:/root/.Xauthority \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-v $HOME/keepass:/home/user/keepass \
-e DISPLAY=unix$DISPLAY \
zburgermeiszter/keepass2
Important: You need to install xterm (sudo apt-get install xterm) on your host to use these features.
Copy the desktop/KeePass.desktop file to your /usr/share/applications folder.
To provide the correct graphics for the launcher icon copy the desktop/keepass2.png
Add your user to docker group to avoid issues with sudo password prompt.
Configure a global hotkey in your system with the following command.
xterm -e "docker exec -it $(docker ps | grep keepass2 | awk '{print $1}') /usr/bin/mono /home/user/.keepass/KeePass.exe -auto-type"
The default KeePass auto-type hotkey is Ctrl + Alt + A.
Global hotkey setup:
To customize the startup of KeePass use the KeePass.config.xml file from this repository and mount it to your
container:
-v $(pwd)/KeePass.config.xml:/home/user/.keepass/KeePass.config.xml
'Gtk: cannot open display: :0'
Try to run the following: xhost + or export DISPLAY=your_host_ip:0
(see: http://stackoverflow.com/questions/28392949/running-chromium-inside-docker-gtk-cannot-open-display-0)
Content type
Image
Digest
Size
74.5 MB
Last updated
over 10 years ago
docker pull zburgermeiszter/keepass2