docker问题

An error occurred trying to connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/containers/json: open //./pipe/docker_engine: 

The system cannot find the file specified.

解决:

ocker-machine env fd

 

 

C:\Users\fd>Docker-machine env --shell CMD default
Host does not exist: "default"

解决:

docker-machine create -d virtualbox fd 创建一个名为fd的docker vm

 

Error checking TLS connection: Error checking and/or regenerating the certs: There was an error validating certificates
for host "192.168.99.101:2376": x509: certificate is valid for 192.168.99.100, not 192.168.99.101
You can attempt to regenerate them using 'docker-machine regenerate-certs [name]'.

Be advised that this will trigger a Docker daemon restart which will stop running containers.

解决:

重新生成凭证

docker-machine regenerate-certs fd2

 

 

 

http://stackoverflow.com/questions/32047660/docker-for-windows-not-working

The Docker Toolbox (in 1.8.x) installation configure by default your Docker Daemon to use secure connection via the TLS protocol (version 1.8).

If you were using an older version of the daemon that wasn't secured that means at least two things : - the port number changed from 2375 to 2376 - your daemon client need to present a certificat to communicate with you docker engine/server.

So the reply of sandiindia indicates the environment variables that precise to the docker client the good configuration to connect to the docker server/engine:

#You're using a TLS secured daemon : 
set DOCKER_TLS_VERIFY=1

# Precise the Docker Host IP and port, the TLS default is 2376
set DOCKER_HOST=tcp://*<docker_host_IP>*:2376

# The paths to the certificate and client key needed to authenticate to the daemon
# You should have 3 files in this directory : ca.pem, cert.pem and key.pem 
# In my case the default path looks like : 
set DOCKER_CERT_PATH=C:\Users\*<username>*\.docker\machine\machines\default

#the name of your Docker Host VM : 
set DOCKER_MACHINE_NAME=default

The docker documentation about TLS configuration : https://docs.docker.com/articles/https/

猜你喜欢

转载自tooby.iteye.com/blog/2347646