How to push image to private docker registry

It’s not a question. I don’t know where I can post this tip

Today I tried to setup private docker registry on Ubuntu 14.04

Everything goes fine. I tried to build one docker image and tag Next, I tried to push this image to private docker registry but I always receive “tls: oversized record received with length 20527”

I tried to search on google and changed /etc/default/docker (add --insecure-registry)

–insecure-registry –insecure-registry

it fails. If I change to: –

It works.


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

You will receive that error message either when when attempting to connect to a TLS (secure) socket without using TLS or attempting to connect to a non-TLS secured socket with TLS.

The configuration in /etc/default/docker may not be sourced in certain situations. It is an implementation detail of the init system (e.g. newer version of Ubuntu with systemd will not use this file). The best approach is to use Dockers own configuration files.

In /etc/docker/daemon.json, set:

  "insecure-registries" : [""]

For more info (and the requisite warnings about using an insecure registry), see: