tg123/sshpiper

Dynamic configuration for docker / swarm containers ?

pwFoo opened this issue · 6 comments

pwFoo commented

Hi,
I know it could be done with additional scripts and piper command, but would be nice to have a plugin / integration... Don't know how much work it would be!

It would be great to generate the a sshpiper user by docker container labels as done with caddy-docker-proxy. sshpiper would need to read SSHPIPER_* labels (user, pass, pubkey, ...) from docker.sock, collect container or swarm (v)ip and generate the needed sshpiper configuration.

tg123 commented

sshpiper already supported load from env like SSHPIPER_*
maybe the only thing is to generate containers with those envs

pwFoo commented

Ok, but sshpiper (or docker-gen) need to read other containers ENV via docker.sock. Native way to read docker.sock would be great, but alternative I need to update my sshpiper + docker-gen construct to the actual version of sshpiper

pwFoo commented

sshpiper already supported load from env like SSHPIPER_*
maybe the only thing is to generate containers with those envs

sshpiper read other containers SSHPIPER_* ENV or just the local ENV? Other containers ENV would be awesome to auto config SSHpiper with other container ENV + container ip as upstream.

tg123 commented

just local SSHPIPER_
you still need a tool to generate upstreams :(

tg123 commented

introduced with
https://github.com/tg123/sshpiper/tree/master/plugin/docker

thanks v1's flexibility

pwFoo commented

Awesome!!! Tested with gitea ssh behind sshpiper