<p>I've just deployed a docker registry.</p>

<p>I'm able to get access to it using:</p>

<pre><code>$ curl -I chart-example.local/v2/                                                                                                                         
HTTP/1.1 200 OK
Content-Length: 2
Content-Type: application/json; charset=utf-8
Date: Tue, 28 Jan 2020 20:10:35 GMT
Docker-Distribution-Api-Version: registry/2.0
Vary: Accept-Encoding
X-Content-Type-Options: nosniff
</code></pre>

<p>However, when I'm trying to push an local image to it, I'm getting this message:</p>

<pre><code>$ docker push chart-example.local/feedly:latest                                                                                                                                                                                                                                                                          
The push refers to repository [chart-example.local/feedly]
Get https://chart-example.local/v2/: x509: certificate has expired or is not yet valid
</code></pre>

<p>Why docker is trying to get access using <code>https</code> instead of <code>http</code>?</p>

Jordi
<p>Docker uses https by default for security. You can override this setting by modifying your <code>daemon.json</code> file with the following content. Do <em>not</em> use this setting in production.</p>

<pre><code> {
   "insecure-registries" : ["chart-example.local"]
 }
</code></pre>

<p>See this link for more information: <a href="https://docs.docker.com/registry/insecure/" rel="nofollow noreferrer">https://docs.docker.com/registry/insecure/</a></p>
