待施工
Docker-compose.yaml
version: '3.3'
services:
registry:
image: registry:2.8.2
container_name: registry
restart: unless-stopped
ports:
- 49998:49998
volumes:
- /volume1/docker/registry/auth:/auth
- /volume1/docker/registry:/var/lib/registry
- /volume1/docker/registry/config.yml:/etc/docker/registry/config.yml
environment:
- TZ=Asia/Shanghai
- HTTPS_PROXY=http://192.168.9.2:7893
- HTTP_PROXY=http://192.168.9.2:7893
- "REGISTRY_PROXY_REMOTEURL=https://registry-1.docker.io"
- "REGISTRY_PROXY_USERNAME=docker_hub_user_name"
- "REGISTRY_PROXY_PASSWORD=docker_hub_user_password"
- REGISTRY_HTTP_ADDR=0.0.0.0:49998
- REGISTRY_STORAGE_DELETE_ENABLED:true
- "REGISTRY_AUTH=htpasswd"
- "REGISTRY_AUTH_HTPASSWD_REALM=Registry Realm"
- REGISTRY_AUTH_HTPASSWD_PATH=/auth/htpasswd
network_mode: bridge
registry-ui:
image: joxit/docker-registry-ui:2
container_name: registry-ui
restart: unless-stopped
ports:
- 49999:80
environment:
- TZ=Asia/Shanghai
- SINGLE_REGISTRY=true
- REGISTRY_TITLE=Docker Registry UI
- DELETE_IMAGES=true
- SHOW_CONTENT_DIGEST=true
- NGINX_PROXY_PASS_URL=http://192.168.9.11:49998
- SHOW_CATALOG_NB_TAGS=true
- CATALOG_MIN_BRANCHES=1
- CATALOG_MAX_BRANCHES=1
- TAGLIST_PAGE_SIZE=100
- REGISTRY_SECURED=true
- CATALOG_ELEMENTS_LIMIT=1000
network_mode: bridge
networks:
bridge:
external: true
config.yml
version: 0.1
log:
fields:
service: registry
storage:
cache:
blobdescriptor: inmemory
filesystem:
rootdirectory: /var/lib/registry
delete:
enabled: true
maintenance:
uploadpurging:
enabled: true
age: 168h
dryrun: false
interval: 1m
http:
addr: 49998
headers:
X-Content-Type-Options: [nosniff]
Access-Control-Allow-Methods: ['HEAD', 'GET', 'OPTIONS', 'DELETE']
Access-Control-Allow-Headers: ['Authorization', 'Accept', 'Cache-Control']
Access-Control-Expose-Headers: ['Docker-Content-Digest']
health:
storagedriver:
enabled: true
interval: 10s
threshold: 3
proxy:
remoteurl: https://registry-1.docker.io
username: docker_hub_user_name
password: docker_hub_user_password
版权属于:Zakikun
本文链接:https://blog.zakikun.com/archives/92.html
本文采用 知识共享署名-非商业性使用 4.0 国际许可协议 进行许可。
您可以自由的转载和修改,但请务必注明文章来源并且不可用于商业目的。