title: Docker private registry with mirror
body: <p>I created two Docker containers. The first one provides a private Docker registry and the second one is a mirror of the official Docker registry:</p>
  
  <pre><code>docker run -d --name registry -v /local/path/to/registry:/registry -e SETTINGS_FLAVOR=local -e STORAGE_PATH=/registry -p 5000:5000 registry
  
  docker run -d --name mirror -v /local/path/to/mirror:/registry -e STORAGE_PATH=/registry -e STANDALONE=false -e MIRROR_SOURCE=https:/registry-1.docker.io -e MIRROR_SOURCE_INDEX=https://index.docker.io -p 5555:5000 registry
  </code></pre>
  
  <p>Now I would like to combine both. Whenever a user <em>pulls</em> images it should first query the private registry and then the mirror. And when images are <em>pushed</em> they should only be pushed to the private registry.</p>
  
  <p>I do not have an idea about how this can be done. Any help is appreciated.</p>