Creating jenkins Access to Servers under Another Container in docker

  docker, question

Two containers were created within docker:
Container 1. jenkins(172.17.0.2) was built
Container 2. Set up a server (172.17.0.3)
SSH was first created in container 2
Then I configure nodes in jenkins in container 1, but my nodes always fail
Node configuration:
图片描述

Error report:
图片描述

I’ve been working on it all day … but I haven’t adjusted it yet. I’m anxious to ask the great god to help my younger brother to have a look …

There is no need to do this, directly jenkins connects to host, and then deletes the container to run a new one. if the deployment is simple, update the directory mounted by -v to restart the container