-
-
Notifications
You must be signed in to change notification settings - Fork 332
/
Copy pathdocker-compose-swarm-registry.yml
59 lines (56 loc) · 1.73 KB
/
docker-compose-swarm-registry.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
51
52
53
54
55
56
57
58
59
version: '3.7'
services:
registry-ui:
image: joxit/docker-registry-ui:latest
environment:
- SINGLE_REGISTRY=true
- REGISTRY_TITLE=Docker Registry UI
# For deleting images, you need to activate the delete feature in the UI with DELETE_IMAGES=true and in your registry.
- DELETE_IMAGES=true
- SHOW_CONTENT_DIGEST=true
- NGINX_PROXY_PASS_URL=http://registry:5000
- SHOW_CATALOG_NB_TAGS=true
- CATALOG_MIN_BRANCHES=1
- CATALOG_MAX_BRANCHES=1
- TAGLIST_PAGE_SIZE=100
- REGISTRY_SECURED=true
- CATALOG_ELEMENTS_LIMIT=1000
networks:
- traefik-net
deploy:
replicas: 1
restart_policy:
condition: on-failure
labels:
- "traefik.enable=true"
- "traefik.http.routers.registryui.rule=Host(`myregistry.com`)"
- "traefik.http.routers.registryui.entrypoints=web"
- "traefik.http.services.registryui.loadbalancer.server.port=80"
- "traefik.http.routers.registryui.service=registryui"
configs:
- source: ui_nginx_config
target: /etc/nginx/conf.d/default.conf
registry:
image: registry:2.8.3
volumes:
- /images:/var/lib/registry
- /htpasswd:/auth
environment:
- REGISTRY_AUTH=htpasswd
- REGISTRY_AUTH_HTPASSWD_REALM=Registry Realm
- REGISTRY_AUTH_HTPASSWD_PATH=/auth
- REGISTRY_HTTP_RELATIVEURLS=true
# For deleting images, you need to activate the delete feature in the registry.
- REGISTRY_STORAGE_DELETE_ENABLED=true
deploy:
replicas: 1
restart_policy:
condition: on-failure
placement:
constraints:
- node.role == manager
networks:
- traefik-net
networks:
traefik-net:
external: true