Created
April 28, 2016 08:25
-
-
Save hirokiky/88a108cf23c20383c2c13ed5b3f2a321 to your computer and use it in GitHub Desktop.
TSL supported WebSocket for docker-py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import docker | |
class WSFixedClient(docker.Client): | |
def _create_websocket_connection(self, url): | |
sslopt = {} | |
if self.cert: | |
sslopt["certfile"] = self.cert[0] | |
sslopt["keyfile"] = self.cert[1] | |
return websocket.create_connection( | |
url, sslopt=sslopt, | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment