This commit is contained in:
Tiara Rodney 2026-03-14 05:38:45 +01:00
commit 883f31932e
No known key found for this signature in database
GPG key ID: 5CD8EC1D46106723
169 changed files with 5676 additions and 0 deletions

View file

@ -0,0 +1,13 @@
version: 0.1
log:
fields:
service: registry
storage:
filesystem:
rootdirectory: /var/lib/registry
delete:
enabled: true
http:
addr: :5000
proxy:
remoteurl: {{ remote_url | default('https://registry-1.docker.io') }}

View file

@ -0,0 +1,12 @@
services:
registry:
image: registry:2
ports:
- "127.0.0.1:{{ port }}:5000"
volumes:
- registry_data:/var/lib/registry
- ./config.yml:/etc/docker/registry/config.yml:ro
restart: unless-stopped
volumes:
registry_data:

View file

@ -0,0 +1,28 @@
<VirtualHost *:80>
ServerName {{ hostname }}
Redirect permanent / https://{{ hostname }}/
</VirtualHost>
<VirtualHost *:443>
ServerName {{ hostname }}
SSLEngine on
SSLCertificateFile {{ ssl_cert }}
SSLCertificateKeyFile {{ ssl_key }}
# Return an empty OCI index for referrers requests.
# registry:2 does not support the OCI referrers API and proxies
# the request to upstream which may return HTML error pages,
# causing Docker 29+ to fail with "failed to decode referrers index".
RewriteEngine on
RewriteRule "^/v2/.*/referrers/" - [R=200,L,E=REFERRERS:1]
Header always set Content-Type "application/vnd.oci.image.index.v1+json" env=REFERRERS
<LocationMatch "^/v2/.*/referrers/">
ErrorDocument 200 '{"schemaVersion":2,"mediaType":"application/vnd.oci.image.index.v1+json","manifests":[]}'
</LocationMatch>
ProxyPreserveHost on
RequestHeader set X-Forwarded-Proto "https"
RequestHeader set X-Forwarded-Ssl "on"
ProxyPass / http://127.0.0.1:{{ port }}/
ProxyPassReverse / http://127.0.0.1:{{ port }}/
</VirtualHost>