getwud / wud

WUD (aka What's up Docker?) gets you notified when a new version of your Docker Container is available.
https://getwud.github.io/wud/
MIT License
1.25k stars 39 forks source link

Feature Request: Connect to remote docker daemon via ssh #416

Open cryptogeek13 opened 4 months ago

cryptogeek13 commented 4 months ago

Docker supports remote connections via ssh: https://docs.docker.com/engine/security/protect-access/#use-ssh-to-protect-the-docker-daemon-socket

This looks like the most secure and most convenient way to connect to remote daemons, because most people are familiar with ssh and it's a lot easier than setting up secure access over TCP by creating your own CA and creating/signing keys. I also saw people using docker-socket-proxy instead, despite the maintainer explicitly advising against opening the containers port to any public network, but I suppose it's simply way easier and convenience wins over security a lot of times, especially if used in non-production or selfhosted environments.

Looking at the docker documentation, it seems like it's quite easy to use. On the remote side one only has to create a user, add it to the docker group and copy the ssh key into authorized_keys. From WUD point of view one only needs to use any authorized ssh key that's mounted into the container, create a context with user and host and then use that context.

But to be fair I don't know this project enough to estimate the amount of work necessary to implement switching between different contexts.

Anyways, thank you for your work. This project is just great. It helps me a lot keeping track of my containers and updating them in time.

fmartinou commented 2 months ago

Hi,

Thanks for the request 👍

Taking a look at the node.js library I use to connect to the Docker engine, it seems doable: https://github.com/apocas/docker-modem?tab=readme-ov-file#ssh

I add it to my todo list.