#300  Ssh inside docker container
Closed
bufferUnderrun opened 3 years ago

Hi,

we've made a windows 2k19s custom image file containing somes of ours tools and an OpenSSH client.

In a build job running this image, we need to connect to ssh server to copy some config file and reload apache. But it's not really working as expect :

image.png

Even using some --t parameter to ssh does not work.

Do you have a way to connect to ssh from docker to another server of our network ?

Thanks

bufferUnderrun commented 3 years ago

When running the image in powershell outside onedev

docker run -it docksdev/band:2.1

This works

ssh onedev@10.52.0.25
bufferUnderrun commented 3 years ago

i've tried to set in onedev config but disabled image_2.png

Robin Shen commented 3 years ago

OneDev can not use "-it" option to run docker as otherwise it will be in interactive mode to cause build hanging. This problem is common to batch script doing ssh things and not specific to OneDev. You may googled around to see if these solutions work:

https://www.google.com/search?q=pseudo+terminal+will+not+be+allocated+because+stdin+is+not+a+terminal&sxsrf=ALeKk03S9SWHGMG5Yo0JpqF8T7Zqiu2MDA%3A1622276854317&ei=9vqxYOfnEs7Zz7sP04as6Ak&oq=pseudo+terminal+will+not+be+allocated+because+stdin+is+not+a+terminal&gs_lcp=Cgdnd3Mtd2l6EAxQAFgAYPodaABwAngAgAFfiAFfkgEBMZgBAKoBB2d3cy13aXrAAQE&sclient=gws-wiz&ved=0ahUKEwjnuoOdvO7wAhXO7HMBHVMDC50Q4dUDCA4

Please post back if you find a workaround so that other users can benefit.

Robin Shen changed state to 'Closed' 3 years ago
Previous Value Current Value
Open
Closed
bufferUnderrun commented 3 years ago

I've already google it but no solution is working. That's why i post here.

So i think i'm the only one who have to connect to ssh inside docker container...

issue 1 of 1
Type
Question
Priority
Normal
Assignee
Issue Votes (0)
Watchers (2)
Reference
onedev/server#300
Please wait...
Page is in error, reload to recover