New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP/Insecure repository: http: server gave HTTP response to HTTPS client #28321

ktamiola opened this Issue Nov 11, 2016 · 6 comments


None yet
7 participants

ktamiola commented Nov 11, 2016

I am trying to setup a local insecure repository on VM running Ubuntu 16.04.1 image. I have followed official configuration guide for local registry and created a daemon.json placed in /etc/docker/daemon.json. I have also modified the contents of /etc/default/docker according to manual. Unfortunately, no luck with plain HTTP repository. Help!


    "insecure-registries": [""]

I am attempting to connect from a different host (, with full access permissions for and push to

docker push


The push refers to a repository []
Get http: server gave HTTP response to HTTPS client

docker info

Containers: 2
 Running: 1
 Paused: 0
 Stopped: 1
Images: 1
Server Version: 1.12.3
Storage Driver: aufs
 Root Dir: /var/lib/docker/aufs
 Backing Filesystem: extfs
 Dirs: 19
 Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
 Volume: local
 Network: host null bridge overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Security Options: apparmor seccomp
Kernel Version: 4.4.0-47-lowlatency
Operating System: Ubuntu 16.04.1 LTS
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 488.3 MiB
Name: peptone-registry
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
WARNING: No swap limit support
Insecure Registries:


# Docker Upstart and SysVinit configuration file

#   Please see the documentation for "systemd drop-ins":

# Customize location of Docker binary (especially for development testing).

# Use DOCKER_OPTS to modify the daemon startup options.

# If you need Docker to use an HTTP proxy, it can also be specified here.
#export http_proxy=""

# This is also a handy place to tweak where Docker's temporary files go.
#export TMPDIR="/mnt/bigdrive/docker-tmp"

This comment has been minimized.

ktamiola commented Nov 11, 2016

It seems the only way to set insecure registry flag is to add,

    "insecure-registries": [""]

to /etc/docker/daemon.json. On Ubuntu 16.04.1 modifications to /etc/default/docker/ seem not to work for insecure registry.

@ktamiola ktamiola closed this Nov 11, 2016


This comment has been minimized.


thaJeztah commented Nov 18, 2016

Correct, that file is not used on systems using systemd as an init system; see the message at the top;

#   Please see the documentation for "systemd drop-ins":

So either use a daemon.json file, or use systemd drop-in files


This comment has been minimized.

abhtibco commented Jan 30, 2017

@ktamiola Thanks!! This solution works for Ubuntu16.04


This comment has been minimized.

MikeMitterer commented Feb 23, 2017

Had the same problem on Mac 10.11. It was not clear to me where to set the "insecure-registries" option on Mac. I think on Mac the /etc/docker/daemon.json is ignored but!! instead we have a nice GUI:

Where kdeneon in this case is where the private registry runs.
Hope this helps someone!


This comment has been minimized.

saavkaar commented Mar 16, 2017

Try adding --insecure-registry option to daemon in /etc/systemd/system/docker.service.d/docker.conf file.
Then sudo systemctl daemon-reload
And sudo service docker restart

It worked for me

OS: Ubuntu 16.04
Docker: 1.26


This comment has been minimized.

selfup commented Oct 21, 2017

@MikeMitterer thanks for that screenshot! Works great 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment