Creating jenkins Access to Servers under Another Container in docker

  docker, question

Two containers were created within docker:
Container 1. jenkins( was built
Container 2. Set up a server (
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