On a virtual server ubuntu 14.04 I have installed docker and I try to push to a local registry an image. I followed this guide on the Docker blog but when I try to push the image I have this output:
Error: Invalid registry endpoint https://xx.xx.xx.xx/v1/: Get https://xx.xx.xx.xx/v1/_ping: x509: certificate has expired or is not yet valid. If this private registry supports only HTTP or HTTPS with an unknown CA certificate, please add
--insecure-registry xx.xx.xx.xx
to the daemon's arguments. In the case of HTTPS, if you have access to the registry's CA certificate, no need for the flag; simply place the CA certificate at /etc/docker/certs.d/xx.xx.xx.xx/ca.crt
I try to add --insecure-registry xx.xx.xx.xx
in /etc/default/docker
file and restart docker service.
Docker fails to start with message /proc/self/fd/9: 17: /etc/default/docker: --insecure-registry: not found
.
PS: I run my registry in a docker container
In the host
In the client
Setting up the docker registry directly on a host is quite frustrating. The easiest way to setup a local docker repository is to use the docker-registry docker image. Simply execute
and docker should download the official docker registry image. After that you can attach to container and customize the setup. Source: http://www.devops-insight.com/2014/12/using-private-docker-repository-registry.html
simply running this
docker run -p 5000:5000 -d registry
will get you in to trouble with https.I found this tutorial helpful : How To Set Up a Private Docker Registry on Ubuntu 14.04
It basically sets up a reverse proxy with nginx to access the private registry. I have 1 vagrant box with the registry and a different vagrant box pulling stuff from this registry. It works :)
Hope that helps
I had the same problem with Ubuntu 12.04 and Docker 1.4.1. Here is my solution:
So, I have an error.
Notice, that there is no extra arguments to /usr/bin/docker.
Let's check if arguments appeared:
Yes, they do. One more attempt: