0

我正在尝试运行一些 Docker 实例以允许 Jenkins 在它们上执行一些工作。

我按照本教程(http://devopscube.com/docker-containers-as-build-slaves-jenkins/)来实现它。它目前正在创建一些新的 docker 实例,但它没有连接到它们。

所有这些新的 docker 实例都必须能够直接访问物理网络,因此必须使用“-net=bridge”来构建它们。每个 docker 容器的每个端口 22 都绑定到一个空闲的主机端口。

所以,问题是我无法通过 SSH 访问访问任何 docker 实例。此外,如果我进入这些 docker 实例之一,我将无法通过 ssh 访问 localhost 获得下一个:

[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