Add first version of the windows ASG provider

This commit is contained in:
Marcos Lilljedahl
2017-08-04 21:54:03 -03:00
parent f810c0c92f
commit ed7cefcf9c
10 changed files with 388 additions and 29 deletions

View File

@@ -192,16 +192,17 @@ func (d *docker) DeleteContainer(id string) error {
}
type CreateContainerOpts struct {
Image string
SessionId string
PwdIpAddress string
ContainerName string
Hostname string
ServerCert []byte
ServerKey []byte
CACert []byte
Privileged bool
HostFQDN string
Image string
WindowsEndpoint string
SessionId string
PwdIpAddress string
ContainerName string
Hostname string
ServerCert []byte
ServerKey []byte
CACert []byte
Privileged bool
HostFQDN string
}
func (d *docker) CreateContainer(opts CreateContainerOpts) (string, error) {
@@ -211,6 +212,8 @@ func (d *docker) CreateContainer(opts CreateContainerOpts) (string, error) {
env := []string{}
env = append(env, fmt.Sprintf("WINDOWS_ENDPOINT=%s", opts.WindowsEndpoint))
// Write certs to container cert dir
if len(opts.ServerCert) > 0 {
env = append(env, `DOCKER_TLSCERT=\/var\/run\/pwd\/certs\/cert.pem`)