1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-11-28 09:08:50 +02:00
dockerfiles/registry/docker-compose.yml
2019-06-20 19:12:01 +08:00

38 lines
885 B
YAML

#
# See: https://docs.docker.com/registry/deploying/
#
registry:
image: registry:2
ports:
- "5000:5000"
volumes:
- /etc/docker/registry
- ./data:/var/lib/registry
- ./certs:/certs
- ./auth:/auth
environment:
- REGISTRY_HTTP_TLS_CERTIFICATE=/certs/domain.crt
- REGISTRY_HTTP_TLS_KEY=/certs/domain.key
- REGISTRY_AUTH=htpasswd
- REGISTRY_AUTH_HTPASSWD_REALM=Registry Realm
- REGISTRY_AUTH_HTPASSWD_PATH=/auth/htpasswd
restart: always
frontend:
image: konradkleine/docker-registry-frontend:v2
ports:
- "8080:80"
- "8443:443"
links:
- registry
volume:
- ./certs/domain.crt:/etc/apache2/domain.crt
- ./certs/domain.key:/etc/apache2/domain.key
environment:
- ENV_DOCKER_REGISTRY_HOST=registry
- ENV_DOCKER_REGISTRY_PORT=5000
- ENV_DOCKER_REGISTRY_USE_SSL=1
- ENV_USE_SSL=yes
restart: always