Can dockerfiles/keepassxc speak to Chrome running on a desktop?
Dear Jessie,
I've been happily running KeePassXC 2.y.z on the Desktop (RHEL7) for a few years.
When v2.5.0 came out a few days ago, the devs upgraded the base requirement from ubuntu:14.04 to ubuntu:16.04. The consequence was that their AppImage no longer runs on RHEL7 because of the gblic requirement (https://github.com/keepassxreboot/keepassxc/issues/3728).
As KeePassXC + Browser extension has become a critical part of my digital life, I've scrambled looking for ways to keep using it on RHEL7 (if there are any). Then I found https://github.com/jessfraz/dockerfiles/blob/master/keepassxc/Dockerfile.
After a few minor changes (mostly to enable browser integration), I now have a KeePassXC 2.5.0 docker container showing up on my desktop that can open my .kdbx files.
Do you have any idea if that might be doable for the KeePassXC Browser extension to be able to reach out to KeePassXC running into a container? I do not know enough about KPXC to know if that'd work at all..
Aside from upgrading to RHEL8 (which I cannot easily do right now), I'm starting to run out of ideas..
Thank you,
Vincent
Issue Label Bot is not confident enough to auto-label this issue. See dashboard for more details.
Coincidentally, I was messing around with this just a few days ago. My naive starting point was to change the path key in the NativeMessagingHosts config JSON for KeepassXC Browser (~/.config/google-chrome/NativeMessagingHosts/org.keepassxc.keepassxc_browser.json) to point to a bash script which runs docker exec keepassxc /usr/bin/keepass-proxy $@. But that isn't enough, maybe because keepassxc.socket isn't accessible outside the container? Passing along the information I've gathered so far, hope it helps. I might give it another try this weekend.
Hi @sjawhar I've given up on running KeePassXC in a container. Instead, the KeePassXC dev team helped me rebuild my own AppImage with their toolchain, which solved my immediate issue.
Damn, I was hoping I had a friend in the fight :laughing: . Good for you though :)
I'd be happy to revisit but until KPXC can consume a socket inside a container, I'd guess that there is little hope.. :(
Did you bind mount the /var/run/docker.sock file?
On Thu, Nov 7, 2019 at 9:28 PM Vincent S. Cojot [email protected] wrote:
I'd be happy to revisit but until KPXC can consume a socket inside a container, I'd guess that there is little hope.. :(
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jessfraz/dockerfiles/issues/511?email_source=notifications&email_token=ABHVQHEAAUMPNF4KSN2QRA3QSTMFRA5CNFSM4JIOARJKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDOTSPA#issuecomment-551369020, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABHVQHELQEYRU42J333XOFLQSTMFRANCNFSM4JIOARJA .
Did you bind mount the /var/run/docker.sock file?
Different socket :smile: Inside the container, KeepassXC creates /tmp/keepassxc.socket. I looked through the source to find a way to control that location (e.g. env variable) so it could be in a mounted directory, but no luck so far.
I think you can do this with a custom python script + Docker API. I had a similar problem and used this stack as boilerplate:
https://stackoverflow.com/questions/50360680/can-you-use-python-sockets-for-docker-container-communication/50375616#50375616
On Fri, Nov 8, 2019 at 6:02 AM Sami Jawhar [email protected] wrote:
Did you bind mount the /var/run/docker.sock file?
Different socket 😄 Inside the container, KeepassXC creates /tmp/keepassxc.socket. I looked through the source to find a way to control that location (e.g. env variable) so it could be in a mounted directory, but no luck so far.
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/jessfraz/dockerfiles/issues/511?email_source=notifications&email_token=ABHVQHHRP3AX57OOVJZZZOLQSVIM7A5CNFSM4JIOARJKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDQ5NWQ#issuecomment-551671514, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABHVQHCEDWUJWRNYZSSFK5LQSVIM7ANCNFSM4JIOARJA .
Inside the container, KeepassXC creates /tmp/keepassxc.socket. I looked through the source to find a way to control that location (e.g. env variable) so it could be in a mounted directory, but no luck so far.
An idea: Mount an arbitrary host folder as /tmp in container. Than make a softlink from /arbitrary/folder/keepassxc.socket to /tmp/keepassxc.socket.
Or just mount --volume /tmp:/tmp:rw as a brute force solution.