Docker机器不能仅处理docker守护进程的客户机ca cert auth

我正在使用像下面这样的可configuration参数来使用我自定义的docker守护进程。

/usr/bin/dockerd -H tcp://0.0.0.0:2376 -H unix:///docker/docker.sock --data-root /docker/data --exec-root /docker/exec --tls --tlscert /etc/docker/server-cert.pem --tlskey /etc/docker/server-key.pem --storage-driver aufs -p /docker/docker.pid 

我只使用ca.pem进行身份validation;

基本上基于给定的CAauthentication服务器(在我的情况下自签名)

我也尝试在同一行创builddocker-machineconfiguration(不要问我为什么,但是我需要这个,因为我正在自定义守护进程)。

我尝试通过提供以下详细信息来创builddocker-machine config.json文件。 但它总是失败。 相反,我不知道为什么这个微不足道的行为不被docker-machine支持。

  ... "AuthOptions": { "CertDir": "$HOME/.docker/machine/certs", "CaCertPath": "$HOME/.docker/machine/machines/2017_11_10____11_38_00/ca.pem" } ... 

我看到了这个和下面的观察机器的源代码; 这意味着客户端密钥和证书是TLS强制性的。请让我知道我缺less什么。 我需要基本的docker-machine,只需ca.pem就可以在客户端configuration最less的tls

注意:我只使用TLS而不使用TLS_VERIFY。

来源: https : //github.com/docker/machine/blob/master/libmachine/cert/cert.go

 // ReadTLSConfig reads the tls config for a machine. func (xcg *X509CertGenerator) ReadTLSConfig(addr string, authOptions *auth.Options) (*tls.Config, error) { caCertPath := authOptions.CaCertPath clientCertPath := authOptions.ClientCertPath clientKeyPath := authOptions.ClientKeyPath log.Debugf("Reading CA certificate from %s", caCertPath) caCert, err := ioutil.ReadFile(caCertPath) if err != nil { return nil, err } log.Debugf("Reading client certificate from %s", clientCertPath) clientCert, err := ioutil.ReadFile(clientCertPath) if err != nil { return nil, err } log.Debugf("Reading client key from %s", clientKeyPath) clientKey, err := ioutil.ReadFile(clientKeyPath) if err != nil { return nil, err } return xcg.getTLSConfig(caCert, clientCert, clientKey, false) }