How to use in docker
liolio6 opened this issue · 2 comments
liolio6 commented
Hi,
Thank you for this very promising program
I want to use it in docker but I'm not really understand the config
I read the video from the docker site and read the docker plugin README.md
From these I create a dumy docker and a sshpiper
docker run -d --name dumy -h dumy \
-l sshpiper.username=dumy \
-l sshpiper.container_username=root \
-l sshpiper.port=22 rastasheep/ubuntu-sshd
docker run -d --name piper -p 2222:2222 \
-e SSHPIPERD_BANNERTEXT="hello from sshpiper" \
-v /root/piper/var:/var/sshpiper \
-v /etc/ssh/ssh_host_rsa_key:/etc/ssh/ssh_host_rsa_key \
farmer1992/sshpiperd:v1.0.50
After a try to connect throught sshpiper
ssh dumy@localhost -p 2222
And I got this error from sshpiper logs
time="2022-11-03T14:29:30Z" level=error msg="cannot create upstream for 172.17.0.1:53614 with password auth: rpc error: code = Unknown desc = open /var/sshpiper/dumy/sshpiper_upstream: no such file or directory"
I think sshpiper try to use workingdir plugin instead of docker plugin
How can I use the docker plugin ?
tg123 commented
please use -e PLUGIN=docker to choose plugin
also remember to add privileged
and /var/run/docker.sock
to use local docker
liolio6 commented
Thanks for you help
It's working with
docker run -d --name piper -p 2222:2222 \
-e PLUGIN=docker \
-e SSHPIPERD_BANNERTEXT="hello from sshpiper" \
-v /root/piper/var:/var/sshpiper \
-v /etc/ssh/ssh_host_rsa_key:/etc/ssh/ssh_host_rsa_key \
-v /var/run/docker.sock:/var/run/docker.sock \
--privileged \
farmer1992/sshpiperd:v1.0.50