I have installed boot2docker and when I tried to play with docker, I have started getting below error for every docker commands that I run.
Error
FATA[0000] Get http:///var/run/docker.sock/v1.18/version: dial unix /var/run/docker.sock: An address incompatible with the requested protocol was used.. Are you trying to connect to a TLS-enabled daemon without TLS?
I have checked about the vm status and everything seems good, as below:
After some troubleshooting, I found that issue was with some system variables. Basically there are three variables, which you need to set to make this working. In windows you can use set command and in Linux you can use export command:
set DOCKER_HOST=tcp://192.168.59.103:2376
set DOCKER_CERT_PATH=C:\Users\kuldeep.d.sharma\.boot2docker\certs\boot2docker-vm
set DOCKER_TLS_VERIFY=1
Note: When you initialize your boot2docker, it will provide you all details and ask to update variables.
P.S.- Change above values accordingly :).
Below is the screen shot, where I tried to set each variable and saw the different result and dependencies of these variables on each other.
Thanks!!
No comments:
Post a Comment