Docker Community Forums

Share and learn in the Docker community.

Error on docker: http: server gave HTTP response to HTTPS client


(Kumarvaradarajulu) #1

Env: Windows 7, docker-toolbox

Problem:

I created a docker-machine, ssh’ed into it and set DOCKER_TLS=no in /var/lib/boot2docker/profile and I restarted the docker machine. When I issue docker -H x.x.x.x:2376 images from a different machine I can get the images.

But when I issue the same command from the machine where docker-machine runs I get, error during connect: Get https://x.x.x.x:2376/v1.37/images/json: http: server gave HTTP response to HTTPS client. The same error is returned on docker-machine env, docker-compose etc

Looks like docker is trying to query https but as the docker-machine has TLS disabled it returns an http response.

Solutions tried so far:

Set insecure-registry in D:\docker\machines\default\config.json, in C:\ProgramData\docker\config\daemon.json and in the %HOME%\.docker\ folders

Please help in forcing docker/docker-machine to make http call to the TLS disabled docker-machine instead of https