Search code examples
dockerdocker-machineboot2docker

Error response from daemon: Get http s://registry-1.docker.io/v2/: proxyconnect tcp: tls: first record does not look like a TLS handshake


I am having virtual box 5.2 on top of Windows 7. I followed docker quick start guide to install docker.docker for windows

Since my machine is behind corporate proxy , i set

HTTP_PROXY=http://xxx:port
HTTPS_PROXY=https://xxx:port
NO_PROXT="192.168.99.1/24"

By passing it while creating docker machine and also did export after machine is up. 'docker-machine create -d virtualbox --engine-env HTTP_PROXY="http://xxx:80" --engine-env HTTPS_PROXY="https://xxx:80" --engine-env NO_PROXY="192.168.99.1/24" default

docker run hello-world shows above error.


Solution

  • This is what worked out for me. Once installed docker as per instructions given docker quick start and create docker machine replace boot2docker.iso at C:\Users\anant.docker\machine\machines\default with the same present at C:\Program Files\Docker Toolbox

    restart docker

    docker-machine restart
    

    apply environment variable

    docker-machine env
    output : 
    

    export DOCKER_TLS_VERIFY="1"

    export DOCKER_HOST="tcp://192.168.99.100:2376"

    export DOCKER_CERT_PATH="C:\Users\anant.docker\machine\machines\default"

    export DOCKER_MACHINE_NAME="default"

    export COMPOSE_CONVERT_WINDOWS_PATHS="true"

    @# Run this command to configure your shell: @# eval $("C:\Program Files\Docker Toolbox\docker-machine.exe" env)

    eval $("C:\Program Files\Docker Toolbox\docker-machine.exe" env)
    

    then to test, try

    docker run hello-world