Skip to content

Instantly share code, notes, and snippets.

@cgarnier
Last active November 5, 2018 05:30
Show Gist options
  • Save cgarnier/a1ab60f634f7fbc066d9 to your computer and use it in GitHub Desktop.
Save cgarnier/a1ab60f634f7fbc066d9 to your computer and use it in GitHub Desktop.
docker compose file for a docker registry
registry:
image: registry:2
restart: always
ports:
- 5000:5000
volumes:
- ./data:/var/lib/registry
- ./certs:/certs
- ./auth:/auth
environment:
# nginx proxy docker config
- VIRTUAL_HOST=registry.domain.tld
- VIRTUAL_PORT=443
- VIRTUAL_PROTO=https
- REGISTRY_HTTP_TLS_CERTIFICATE=/certs/registry.bundle.crt
- REGISTRY_HTTP_TLS_KEY=/certs/registry.key
- REGISTRY_AUTH=htpasswd
- REGISTRY_AUTH_HTPASSWD_REALM=Registry Realm
- REGISTRY_AUTH_HTPASSWD_PATH=/auth/htpasswd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment