1
0
mirror of https://github.com/docker/docs.git synced 2026-11-05 00:14:17 +03:00

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

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 {