import libcloud.security from libcloud.container.types import Provider from libcloud.container.providers import get_driver import ssl from time import sleep # this code is to declare private CA Root - created specifically for docker TLS connection libcloud.security.SSL_VERSION = ssl.PROTOCOL_TLSv1 libcloud.security.CA_CERTS_PATH.append('/path/to/ca.pem') url = 'https://my.wildcard.domain.example.com' port = 2376 key = '/path/to/key.pem' cer = '/path/to/cert.pem' # I even tried to bunde CA and CERT into one file and pass it to "cert_file" parameter # like this: cat cert.pem ca.pe > bundle.pem #cer = '/path/to/bundle.pem' driver = cls(host=url, port=port, secure=True, key_file=key, cert_file=cer) print('docker connected') # console checkpoint img_list = driver.list_images() # fails here print(len(img_list)) # console checkpoint