fsouza/go-dockerclient — pull request #169 by jbdalido (2014-10-23 14:36:35+00:00)
Title: Add support for ssl connections

Hi guys,

the last boot2docker update (1.3) pretty much broke every tools we have on mac. They introduce the use of https for every client. i ran into two problems, the first is we're defining here https://github.com/fsouza/go-dockerclient/blob/master/client.go#L522 that a tcp endpoint is http not https, but i don't think it's a real problem so we fixed it on our side by providing go-dockerclient a https endpoint.

And the second is we need to provide the pair cert/key to be able to connect to boot2docker, to avoid running in front of errors like :

ERROR Could not connect to the adapter Get https://X.X.X.X:2376/_ping: x509: certificate signed by unknown authority

or

Get https://X.X.X.X:2376/version: x509: certificate signed by unknown authority (possibly because of "x509: invalid signature: parent certificate cannot sign this kind of certificate" while trying to verify candidate authority certificate "serial:95231589439385508318461161892776490645"

To resolve all those issues i'd like to add two new method providing path for the cert-key pair. I did not write the tests yet, but if @fsouza validates i'll do them tomorrow or the next day.

Thanks and have a very good day !