Allow to connect to docker daemons without certificates but using tls

This commit is contained in:
Jonathan Leibiusky @xetorthio
2017-09-15 17:19:34 -03:00
parent 6ac9784bef
commit e9e20a5e79
3 changed files with 11 additions and 5 deletions

View File

@@ -41,6 +41,7 @@ type SessionSetupInstanceConf struct {
IsSwarmWorker bool `json:"is_swarm_worker"`
Type string `json:"type"`
Run [][]string `json:"run"`
Tls bool `json:"tls"`
}
func (p *pwd) SessionNew(duration time.Duration, stack, stackName, imageName string) (*types.Session, error) {
@@ -241,6 +242,7 @@ func (p *pwd) SessionSetup(session *types.Session, sconf SessionSetupConf) error
Hostname: conf.Hostname,
PlaygroundFQDN: sconf.PlaygroundFQDN,
Type: conf.Type,
Tls: conf.Tls,
}
i, err := p.InstanceNew(session, instanceConf)
if err != nil {

View File

@@ -13,6 +13,7 @@ type Instance struct {
CACert []byte `json:"ca_cert" bson:"ca_cert"`
Cert []byte `json:"cert" bson:"cert"`
Key []byte `json:"key" bson:"key"`
Tls bool `json:"tls" bson:"tls"`
SessionId string `json:"session_id" bson:"session_id"`
ProxyHost string `json:"proxy_host" bson:"proxy_host"`
SessionHost string `json:"session_host" bson:"session_host"`
@@ -34,6 +35,7 @@ type InstanceConfig struct {
CACert []byte
Cert []byte
Key []byte
Tls bool
PlaygroundFQDN string
Type string
}