0

Jenkins がいくつかのジョブを実行できるように、いくつかの Docker インスタンスを実行しようとしています。

このチュートリアル ( http://devopscube.com/docker-containers-as-build-slaves-jenkins/ ) に従って、それを達成しました。現在、いくつかの新しい docker インスタンスを作成していますが、それらに接続していません。

これらの新しい Docker インスタンスはすべて、物理ネットワークに直接アクセスできる必要があるため、「-net=bridge」で構築する必要があります。各 docker コンテナーの各ポート 22 は、空いているホスト ポートにバインドされています。

つまり、SSH アクセスを介して Docker インスタンスに到達できないということです。さらに、これらの docker インスタンスのいずれかにアクセスすると、localhost に対して ssh を実行できず、次のものを取得できません。

[jenkins@d4084633f2bc ~]$ ssh localhost -v
OpenSSH_6.6.1, OpenSSL 1.0.1e-fips 11 Feb 2013
debug1: Reading configuration data /home/jenkins/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 56: Applying options for *
debug1: Connecting to localhost [::1] port 22.
debug1: Connection established.
debug1: identity file /home/jenkins/.ssh/id_rsa type -1
debug1: identity file /home/jenkins/.ssh/id_rsa-cert type -1
debug1: identity file /home/jenkins/.ssh/id_dsa type -1
debug1: identity file /home/jenkins/.ssh/id_dsa-cert type -1
debug1: identity file /home/jenkins/.ssh/id_ecdsa type -1
debug1: identity file /home/jenkins/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/jenkins/.ssh/id_ed25519 type -1
debug1: identity file /home/jenkins/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.6.1
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1
debug1: match: OpenSSH_6.6.1 pat OpenSSH_6.6.1* compat 0x04000000
debug1: SSH2_MSG_KEXINIT sent
Read from socket failed: Connection reset by peer

どうすればこれを解決できますか? 誰もそれを知っていますか?前もって感謝します。

4

0 に答える 0