-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
50 lines (47 loc) · 1.67 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
version: '3.8'
services:
registry:
image: registry:2
container_name: registry
ports:
- "${REGISTRY_PORT}:5000"
environment:
REGISTRY_AUTH: htpasswd
REGISTRY_AUTH_HTPASSWD_REALM: "Registry Realm"
REGISTRY_AUTH_HTPASSWD_PATH: /auth/htpasswd
REGISTRY_HTTP_TLS_CERTIFICATE: /certs/${SSL_DOMAIN_DIR}/${SSL_CERT_FILE}
REGISTRY_HTTP_TLS_KEY: /certs/${SSL_DOMAIN_DIR}/${SSL_KEY_FILE}
REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY: /var/lib/registry
REGISTRY_HTTP_HEADERS_Access-Control-Allow-Origin: '["${REGISTRY_UI_PROTOCOL}://${REGISTRY_DOMAIN}:${REGISTRY_UI_PORT}"]'
REGISTRY_HTTP_HEADERS_Access-Control-Allow-Methods: '["HEAD", "GET", "OPTIONS", "DELETE"]'
REGISTRY_HTTP_HEADERS_Access-Control-Allow-Headers: '["Authorization", "Accept", "Cache-Control"]'
REGISTRY_HTTP_HEADERS_Access-Control-Expose-Headers: '["Docker-Content-Digest"]'
REGISTRY_HTTP_HEADERS_Access-Control-Allow-Credentials: '[true]'
volumes:
- ./auth:/auth
- ${SSL_CERT_DIR}:/certs
- ./data:/var/lib/registry
networks:
- registry-net
restart: always
registry-ui:
image: joxit/docker-registry-ui:latest
ports:
- "${REGISTRY_UI_PORT}:80"
environment:
- REGISTRY_TITLE=${REGISTRY_TITLE}
- REGISTRY_URL=${REGISTRY_PROTOCOL}://${REGISTRY_DOMAIN}:${REGISTRY_PORT}
- SINGLE_REGISTRY=true
- REGISTRY_ALLOW_BASIC_AUTH=true
- REGISTRY_USER=${REGISTRY_USER}
- REGISTRY_PASS=${REGISTRY_PASSWORD}
volumes:
- ${SSL_CERT_DIR}:/certs:ro
networks:
- registry-net
depends_on:
- registry
restart: always
networks:
registry-net:
driver: bridge