Last active
October 18, 2019 17:09
-
-
Save ualter/52ef5d1762abbda4752d0c44eb2fabd9 to your computer and use it in GitHub Desktop.
Docker Compose for Docker Local Registry (My-Registry)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.3' | |
services: | |
registry: | |
image: registry:2 | |
restart: always | |
ports: | |
- "5000" | |
environment: | |
REGISTRY_STORAGE_DELETE_ENABLED: 'true' | |
REGISTRY_HTTP_ADDR: 0.0.0.0:5000 | |
REGISTRY_HTTP_TLS_CERTIFICATE: /certs/domain.crt | |
REGISTRY_HTTP_TLS_KEY: /certs/domain.key | |
## In case the Images being stored at AWS S3 | |
#REGISTRY_STORAGE: s3 | |
#REGISTRY_STORAGE_S3_ACCESSKEY: <api access key> | |
#REGISTRY_STORAGE_S3_SECRETKEY: <api secret> | |
#REGISTRY_STORAGE_S3_BUCKET: <bucket name> | |
#REGISTRY_STORAGE_S3_REGION: <region> | |
#REGISTRY_HEALTH_STORAGEDRIVER_ENABLED: false | |
## HTTP Basic Authentication for Registry Access | |
REGISTRY_AUTH: 'htpasswd' | |
REGISTRY_AUTH_HTPASSWD_REALM: 'docker-ualter' | |
REGISTRY_AUTH_HTPASSWD_PATH: '/httpasswd_storage/htpasswd' | |
ports: | |
- "5000:5000" | |
volumes: | |
- ${MY_REGISTRY_CERTS}:/certs | |
- ${REGISTRY_AUTH_PATH}:/httpasswd_storage | |
registry-frontend: | |
image: konradkleine/docker-registry-frontend:v2 | |
restart: always | |
environment: | |
ENV_DOCKER_REGISTRY_HOST: 'registry' | |
ENV_DOCKER_REGISTRY_PORT: 5000 | |
links: | |
- registry | |
ports: | |
- "8080:80" | |
expose: | |
- 80 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment