fixes #289: path issue for windows machine clients

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
This commit is contained in:
Evan Hazlett 2015-01-16 17:18:30 -05:00
parent e6de563d62
commit c5076f81b1
No known key found for this signature in database
GPG Key ID: A519480096146526
1 changed files with 6 additions and 3 deletions

View File

@ -177,19 +177,22 @@ func (h *Host) ConfigureAuth() error {
if err != nil {
return err
}
machineCaCertPath := filepath.Join(d.GetDockerConfigDir(), "ca.pem")
// due to windows clients, we cannot use filepath.Join as the paths
// will be mucked on the linux hosts
machineCaCertPath := fmt.Sprintf("%s/ca.pem", d.GetDockerConfigDir())
serverCert, err := ioutil.ReadFile(serverCertPath)
if err != nil {
return err
}
machineServerCertPath := filepath.Join(d.GetDockerConfigDir(), "server.pem")
machineServerCertPath := fmt.Sprintf("%s/server.pem", d.GetDockerConfigDir())
serverKey, err := ioutil.ReadFile(serverKeyPath)
if err != nil {
return err
}
machineServerKeyPath := filepath.Join(d.GetDockerConfigDir(), "server-key.pem")
machineServerKeyPath := fmt.Sprintf("%s/server-key.pem", d.GetDockerConfigDir())
cmd, err = d.GetSSHCommand(fmt.Sprintf("echo \"%s\" | sudo tee -a %s", string(caCert), machineCaCertPath))
if err != nil {