Skip to content

Latest commit

 

History

History

nginx-docker-registry-auth-proxy

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Container Registry Auth Proxy

This is to avoid using docker login on every machine on LAN. By using this proxy you can provide unrestricted access to a private registry.

Usage:

  1. Use docker login once to generate credentials.
  2. Inspect $HOME/.docker/config.json, find auth for the registry:
    {
        "auths": {
            "registry.example.com": {
                "auth": "YOU NEED THIS STRING"
            }
        }
    }
  3. Fill in the environment variables in docker-compose.yml:
    • NGINX_SERVER_NAME: host name of the proxy.
    • NGINX_AUTH_CREDENTIALS: the auth hash you've got during the previous step.
    • NGINX_PROXY_TO: URL of the private registry.
  4. Bring up the proxy with docker-compose up and test it with docker pull $NGINX_SERVER_NAME/image:tag.