Add Registry UI

This commit is contained in:
Tobias Manske 2022-06-25 14:38:17 +02:00
parent e89af2ce47
commit 15d45f43f6
Signed by: tobias
GPG Key ID: E83C743C1FC2F79A
2 changed files with 55 additions and 4 deletions

View File

@ -0,0 +1,30 @@
version: 0.1
log:
fields:
service: registry
storage:
cache:
blobdescriptor: inmemory
filesystem:
rootdirectory: /var/lib/registry
delete:
enabled: true
auth:
htpasswd:
realm: Registry Realm
path: /auth/htpasswd
http:
addr: :5000
headers:
Access-Control-Expose-Headers: ['Docker-Content-Digest']
Access-Control-Allow-Methods: ['HEAD', 'GET', 'OPTIONS', 'DELETE']
Access-Control-Allow-Origin: ['https://registry-ui.tobiasmanske.de']
Access-Control-Allow-Credentials: [true]
Access-Control-Allow-Headers: ['Authorization', 'Accept']
X-Content-Type-Options: [nosniff]
health:
storagedriver:
enabled: true
interval: 10s
threshold: 3

View File

@ -12,13 +12,32 @@ services:
image: 'registry:2'
networks:
- gateway
environment:
REGISTRY_AUTH: htpasswd
REGISTRY_AUTH_HTPASSWD_PATH: /auth/htpasswd
REGISTRY_AUTH_HTPASSWD_REALM: Registry Realm
- backend
volumes:
- registry_data:/var/lib/registry
- ./htpasswd:/auth/htpasswd:ro,z
- ./config.yaml:/etc/docker/registry/config.yml:ro,z
frontend:
image: joxit/docker-registry-ui:latest
restart: unless-stopped
depends_on:
- registry
environment:
- DELETE_IMAGES=true
- REGISTRY_TITLE=My Private Docker Registry
- NGINX_PROXY_PASS_URL=http://registry:5000
- SINGLE_REGISTRY=true
labels:
- "traefik.enable=true"
- "traefik.http.routers.registryui.rule=Host(`registry-ui.tobiasmanske.de`)"
- "traefik.http.routers.registryui.entryPoints=websecure"
- "traefik.http.services.registryui.loadbalancer.server.port=80"
- "com.centurylinklabs.watchtower.scope=update"
networks:
- gateway
- backend
volumes:
registry_data:
@ -26,4 +45,6 @@ volumes:
networks:
gateway:
external: true
backend:
internal: true
...