docker-py
docker-py copied to clipboard
dockerpy fails with ssh if remote machine was not added to hosts
This could be avoided by doing ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) before as mentioned on https://github.com/onyxfish/relay/issues/11#issuecomment-26494294
INTERNALERROR> File "/root/rdo/ansible-role-container-registry/.tox/molecule/lib/python3.6/site-packages/docker/client.py", line 40, in __init__
INTERNALERROR> self.api = APIClient(*args, **kwargs)
INTERNALERROR> File "/root/rdo/ansible-role-container-registry/.tox/molecule/lib/python3.6/site-packages/docker/api/client.py", line 166, in __init__
INTERNALERROR> base_url, timeout, pool_connections=num_pools
INTERNALERROR> File "/root/rdo/ansible-role-container-registry/.tox/molecule/lib/python3.6/site-packages/docker/transport/sshconn.py", line 84, in __init__
INTERNALERROR> self._connect()
INTERNALERROR> File "/root/rdo/ansible-role-container-registry/.tox/molecule/lib/python3.6/site-packages/docker/transport/sshconn.py", line 94, in _connect
INTERNALERROR> parsed.hostname, parsed.port, parsed.username,
INTERNALERROR> File "/root/rdo/ansible-role-container-registry/.tox/molecule/lib/python3.6/site-packages/paramiko/client.py", line 416, in connect
INTERNALERROR> self, server_hostkey_name, server_key
INTERNALERROR> File "/root/rdo/ansible-role-container-registry/.tox/molecule/lib/python3.6/site-packages/paramiko/client.py", line 824, in missing_host_key
INTERNALERROR> "Server {!r} not found in known_hosts".format(hostname)
INTERNALERROR> paramiko.ssh_exception.SSHException: Server 'n0' not found in known_hosts