title: How to "add" the proxy section to configure a registry as a pull-through cache?
body: <p>I want to configure a local pull-through registry cache, and following this document: 
  <a href="https://github.com/docker/distribution/blob/master/docs/mirror.md#configuring-the-cache" rel="nofollow">https://github.com/docker/distribution/blob/master/docs/mirror.md#configuring-the-cache</a></p>
  
  <p>It says I need to add such a section:</p>
  
  <pre><code>proxy:
    remoteurl: https://registry-1.docker.io
    username: [username]
    password: [password]
  </code></pre>
  
  <p>I have several questions:</p>
  
  <ol>
  <li>What's the <code>https://registry-1.docker.io</code>? Is it a public registry which is the same as the offical docker registry?</li>
  <li>What's the correct url if I want to the cache to connect to the offical registry?</li>
  <li>How to "add" this section?</li>
  </ol>
  
  <p>About "how to add this section", this document <a href="https://docs.docker.com/registry/configuration/" rel="nofollow">https://docs.docker.com/registry/configuration/</a> says two ways:</p>
  
  <ol>
  <li>pass <code>-e REGISTRY_PROXY_REMOTEURL=http://???</code> to <strong>override</strong> a configuration</li>
  <li>provide a <code>config.yml</code> to override the default <strong>completely</strong></li>
  </ol>
  
  <p>It seems the two approaches don't suit it, I need a way to "add", how can I do it?</p>