Public | Automated Build

Last pushed: a year ago
Short Description
Nginx reverse proxy for docker registry, that automatically generates valid SSL cert.
Full Description

Docker Registry 2.0 Proxy

Use this image to run Docker Registry 2.0 behind nginx proxy, with SSL and basic_auth enabled.


First run official Docker Registry 2.0 container:

docker run --name registry registry:2.0

Then run the proxy:

docker run -p 443:443 \
    -e DOMAIN="" \
    -e ENV="production" \
    --link docker-registry:registry \

Environment Variables

  • REGISTRY_HOST ... hostname of the registry container
  • REGISTRY_PORT ... port number of the registry container
  • SERVER_NAME ... nginx server_name directive value
  • DOMAIN ... external hostname of the nginx container (needed for auto SSL generation)
  • EMAIL ... email address to register SSL certificate with
  • HTPASSWD_USER ... username for registry basic auth
  • HTPASSWD_PASS ... password for registry basic auth
  • ENV ... set this to 'production' to enable real certificate


edit / script for resolving the container hostname at runtime

Docker Pull Command
Source Repository