1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-11-28 09:08:50 +02:00

update registry

This commit is contained in:
kev 2021-12-13 13:21:46 +08:00
parent 53c61b65f2
commit 9866d864d6
3 changed files with 99 additions and 79 deletions

View File

@ -6,39 +6,36 @@ registry
## docker-compose.yml
```yaml
registry:
image: registry:2
ports:
- "5000:5000"
volumes:
- /etc/docker/registry
- ./data:/var/lib/registry
- ./certs:/certs
- ./auth:/auth
environment:
- REGISTRY_HTTP_TLS_CERTIFICATE=/certs/domain.crt
- REGISTRY_HTTP_TLS_KEY=/certs/domain.key
- REGISTRY_AUTH=htpasswd
- REGISTRY_AUTH_HTPASSWD_REALM=Registry Realm
- REGISTRY_AUTH_HTPASSWD_PATH=/auth/htpasswd
restart: always
version: "3.8"
services:
registry:
image: registry:2
ports:
- "5000:5000"
volumes:
- /etc/docker/registry
- ./data:/var/lib/registry
- ./certs:/certs
- ./auth:/auth
environment:
- REGISTRY_HTTP_TLS_CERTIFICATE=/certs/domain.crt
- REGISTRY_HTTP_TLS_KEY=/certs/domain.key
- REGISTRY_AUTH=htpasswd
- REGISTRY_AUTH_HTPASSWD_REALM=Registry Realm
- REGISTRY_AUTH_HTPASSWD_PATH=/auth/htpasswd
restart: unless-stopped
frontend:
image: konradkleine/docker-registry-frontend:v2
ports:
- "8080:80"
- "8443:443"
links:
- registry
volume:
- ./certs/domain.crt:/etc/apache2/domain.crt
- ./certs/domain.key:/etc/apache2/domain.key
environment:
- ENV_DOCKER_REGISTRY_HOST=registry
- ENV_DOCKER_REGISTRY_PORT=5000
- ENV_DOCKER_REGISTRY_USE_SSL=1
- ENV_USE_SSL=yes
restart: always
webui:
image: joxit/docker-registry-ui:2
ports:
- "5080:80"
environment:
- NGINX_PROXY_PASS_URL=http://registry:5000
- REGISTRY_TITLE=EasyPi Docker Registry
- DELETE_IMAGES=true
depends_on:
- registry
restart: unless-stopped
```
## Server Setup

View File

@ -1,18 +1,42 @@
#
# See: https://docs.docker.com/registry/storage-drivers/oss/
# See:
# - https://docs.docker.com/registry/storage-drivers/oss/
# - https://github.com/Joxit/docker-registry-ui
#
registry:
image: registry:2
ports:
- 5000:5000
environment:
- REGISTRY_STORAGE=oss
- REGISTRY_STORAGE_OSS_ACCESSKEYID=xxxxxxxxxxxxxxxx
- REGISTRY_STORAGE_OSS_ACCESSKEYSECRET=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- REGISTRY_STORAGE_OSS_REGION=oss-us-west-1
- REGISTRY_STORAGE_OSS_INTERNAL=true
- REGISTRY_STORAGE_OSS_BUCKET=easypi
- REGISTRY_STORAGE_OSS_SECURE=false
- REGISTRY_STORAGE_OSS_ROOTDIRECTORY=/registry/
restart: always
version: "3.8"
services:
registry:
image: registry:2
ports:
- "5000:5000"
volumes:
- ./data:/etc/docker/registry
environment:
- REGISTRY_STORAGE=oss
- REGISTRY_STORAGE_OSS_ACCESSKEYID=xxxxxxxxxxxxxxxx
- REGISTRY_STORAGE_OSS_ACCESSKEYSECRET=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- REGISTRY_STORAGE_OSS_REGION=oss-cn-beijing
- REGISTRY_STORAGE_OSS_INTERNAL=true
- REGISTRY_STORAGE_OSS_BUCKET=easypi
- REGISTRY_STORAGE_OSS_SECURE=true
- REGISTRY_STORAGE_OSS_ROOTDIRECTORY=/registry/
- REGISTRY_STORAGE_DELETE_ENABLED=true
- REGISTRY_AUTH=htpasswd
- REGISTRY_AUTH_HTPASSWD_REALM=Registry Realm
- REGISTRY_AUTH_HTPASSWD_PATH=/etc/docker/registry/htpasswd
restart: unless-stopped
webui:
image: joxit/docker-registry-ui:2
ports:
- "5080:80"
environment:
- NGINX_PROXY_PASS_URL=http://registry:5000
- REGISTRY_TITLE=EasyPi Docker Registry
- DELETE_IMAGES=true
depends_on:
- registry
restart: unless-stopped

View File

@ -2,36 +2,35 @@
# See: https://docs.docker.com/registry/deploying/
#
registry:
image: registry:2
ports:
- "5000:5000"
volumes:
- /etc/docker/registry
- ./data:/var/lib/registry
- ./certs:/certs
- ./auth:/auth
environment:
- REGISTRY_HTTP_TLS_CERTIFICATE=/certs/domain.crt
- REGISTRY_HTTP_TLS_KEY=/certs/domain.key
- REGISTRY_AUTH=htpasswd
- REGISTRY_AUTH_HTPASSWD_REALM=Registry Realm
- REGISTRY_AUTH_HTPASSWD_PATH=/auth/htpasswd
restart: always
version: "3.8"
frontend:
image: konradkleine/docker-registry-frontend:v2
ports:
- "8080:80"
- "8443:443"
links:
- registry
volume:
- ./certs/domain.crt:/etc/apache2/domain.crt
- ./certs/domain.key:/etc/apache2/domain.key
environment:
- ENV_DOCKER_REGISTRY_HOST=registry
- ENV_DOCKER_REGISTRY_PORT=5000
- ENV_DOCKER_REGISTRY_USE_SSL=1
- ENV_USE_SSL=yes
restart: always
services:
registry:
image: registry:2
ports:
- "5000:5000"
volumes:
- /etc/docker/registry
- ./data:/var/lib/registry
- ./certs:/certs
- ./auth:/auth
environment:
- REGISTRY_HTTP_TLS_CERTIFICATE=/certs/domain.crt
- REGISTRY_HTTP_TLS_KEY=/certs/domain.key
- REGISTRY_AUTH=htpasswd
- REGISTRY_AUTH_HTPASSWD_REALM=Registry Realm
- REGISTRY_AUTH_HTPASSWD_PATH=/auth/htpasswd
restart: unless-stopped
webui:
image: joxit/docker-registry-ui:2
ports:
- "5080:80"
environment:
- NGINX_PROXY_PASS_URL=http://registry:5000
- REGISTRY_TITLE=EasyPi Docker Registry
- DELETE_IMAGES=true
depends_on:
- registry
restart: unless-stopped