Initial setup and configuration.

This commit is contained in:
Madeorsk 2021-08-02 21:37:10 +02:00
commit 1daf219fb0
4 changed files with 65 additions and 0 deletions

3
.env.sample Normal file
View File

@ -0,0 +1,3 @@
REGISTRY_TITLE=Docker registry
REGISTRY_URL=https://localhost:5000
SINGLE_REGISTRY=true

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
/.env
/registry-auth
/registry-data

34
docker-compose.yml Normal file
View File

@ -0,0 +1,34 @@
version: '3'
services:
server:
image: registry
ports:
- 127.0.0.1:5009:5000
networks:
- docker-registry
volumes:
- ./registry-data:/var/lib/registry
- ./registry-auth:/auth
- ./registry-config/config.yml:/etc/docker/registry/config.yml
environment:
REGISTRY_AUTH: 'htpasswd'
REGISTRY_AUTH_HTPASSWD_PATH: '/auth/htpasswd'
REGISTRY_AUTH_HTPASSWD_REALM: 'Registry Realm'
restart: always
ui:
image: joxit/docker-registry-ui
ports:
- 127.0.0.1:8009:80
env_file:
- .env
depends_on:
- server
networks:
- docker-registry
restart: always
networks:
docker-registry:
name: docker_registry_network

View File

@ -0,0 +1,25 @@
version: 0.1
log:
fields:
service: registry
storage:
cache:
blobdescriptor: inmemory
filesystem:
rootdirectory: /var/lib/registry
http:
addr: :5000
headers:
X-Content-Type-Options: [nosniff]
Access-Control-Allow-Origin: ['https://docker.madeorsk.com']
Access-Control-Allow-Methods: ['HEAD', 'GET', 'OPTIONS', 'DELETE']
Access-Control-Allow-Headers: ['Authorization', 'Accept']
Access-Control-Max-Age: [1728000]
Access-Control-Allow-Credentials: [true]
Access-Control-Expose-Headers: ['Docker-Content-Digest']
health:
storagedriver:
enabled: true
interval: 10s
threshold: 3