Out 1
/Users/kestenbroughton/anaconda/lib/python2.7/site-packages/requests/sessions.pyc in send(self, request, _kwargs)
571
572 # Send the request
--> 573 r = adapter.send(request, _kwargs)
574
575 # Total elapsed time of the request (approximately)
/Users/kestenbroughton/anaconda/lib/python2.7/site-packages/requests/adapters.pyc in send(self, request, stream, timeout, verify, cert, proxies)
413
414 except (ProtocolError, socket.error) as err:
--> 415 raise ConnectionError(err, request=request)
416
417 except MaxRetryError as e:
I'm running on a mac gh3.version Out[96]: '1.0.0a2'
(master)][conda_py2] openssl OpenSSL> version OpenSSL 1.0.1k 8 Jan 2015
In an Ipython Notebook (python 2.7 conda install)
Cell 3 from docker import tls repo = gh.repository("MyOrg", "myRepo") DOCKER_CERT_PATH="/Path/To/.docker/machine/machines/mymachine/ca.pem" tls_config = tls.TLSConfig(ca_cert=DOCKER_CERT_PATH)
Cell 4
%debug from docker import Client cli = Client(base_url='https://192.168.99.102:2376', tls=tls_config) cli.images()
Out 4
ipdb> ssl_version 5 ipdb> _openssl_versions {1: 2, 2: 3, 3: 4}
Cell 2
%debug cli = Client(base_url='https://192.168.99.102:2376') cli.images()
Out 2
ipdb> url '/v1.19/images/json?only_ids=0&all=0' ipdb> str(err) * TypeError: str** returned non-string (type Error)
I switched to using https rather than tcp on advice from a stack overflow on this error. Should docs be updated?
Cell 1 cli = Client(base_url='tcp://192.168.99.102:2376') cli.images()
Out 1 /Users/kestenbroughton/anaconda/lib/python2.7/site-packages/requests/sessions.pyc in send(self, request, _kwargs) 571 572 # Send the request --> 573 r = adapter.send(request, _kwargs) 574 575 # Total elapsed time of the request (approximately)
/Users/kestenbroughton/anaconda/lib/python2.7/site-packages/requests/adapters.pyc in send(self, request, stream, timeout, verify, cert, proxies) 413 414 except (ProtocolError, socket.error) as err: --> 415 raise ConnectionError(err, request=request) 416 417 except MaxRetryError as e:
ConnectionError: ('Connection aborted.', BadStatusLine('\x15\x03\x01\x00\x02\x02\n',))