代码拉取完成,页面将自动刷新
package commands
import (
"fmt"
"os"
"path/filepath"
"github.com/docker/machine/commands/mcndirs"
"github.com/docker/machine/libmachine"
"github.com/docker/machine/libmachine/check"
"github.com/docker/machine/libmachine/log"
)
func cmdConfig(c CommandLine, api libmachine.API) error {
// Ensure that log messages always go to stderr when this command is
// being run (it is intended to be run in a subshell)
log.SetOutWriter(os.Stderr)
target, err := targetHost(c, api)
if err != nil {
return err
}
host, err := api.Load(target)
if err != nil {
return err
}
dockerHost, _, err := check.DefaultConnChecker.Check(host, c.Bool("swarm"))
if err != nil {
return fmt.Errorf("Error running connection boilerplate: %s", err)
}
log.Debug(dockerHost)
tlsCACert := filepath.Join(mcndirs.GetMachineDir(), host.Name, "ca.pem")
tlsCert := filepath.Join(mcndirs.GetMachineDir(), host.Name, "cert.pem")
tlsKey := filepath.Join(mcndirs.GetMachineDir(), host.Name, "key.pem")
// TODO(nathanleclaire): These magic strings for the certificate file
// names should be cross-package constants.
fmt.Printf("--tlsverify\n--tlscacert=%q\n--tlscert=%q\n--tlskey=%q\n-H=%s\n",
tlsCACert, tlsCert, tlsKey, dockerHost)
return nil
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。