Add quick exemple for issue #75

This commit is contained in:
Joxit 2019-04-15 20:30:50 +02:00
parent 188cb80463
commit 5b0ffc8eab
No known key found for this signature in database
GPG Key ID: F526592B8E012263
4 changed files with 82 additions and 0 deletions

View File

@ -0,0 +1,7 @@
# Example for issue #75
Run this command `docker-compose up -d`, then you can push your images (e.g localhost:5000/alpine).
Be careful, the docker registry is using status codes 307 for each requests, that means you must configure your s3 to accept same requests as your private registry (that means `DELETE`, `Access-Control-Allow-Origin` and others).
This s3 server allow all requests.

View File

@ -0,0 +1,32 @@
version: '2.0'
services:
registry:
image: registry:2.7
volumes:
- ./registry-data:/var/lib/registry
- ./registry-config/config.yml:/etc/docker/registry/config.yml
depends_on:
- s3-server
network_mode: host
ui:
image: joxit/docker-registry-ui:static
ports:
- 80:80
environment:
- URL=http://127.0.0.1:5000
- DELETE_IMAGES=true
depends_on:
- registry
network_mode: host
s3-server:
image: minio/minio:RELEASE.2019-04-09T01-22-30Z
volumes:
- ./s3-server-cmd:/bin/s3-server-cmd:ro
environment:
- MINIO_ACCESS_KEY=accessKey1
- MINIO_SECRET_KEY=verySecretKey1
- MINIO_REGION=us-east-1
network_mode: host
entrypoint: /bin/s3-server-cmd

View File

@ -0,0 +1,37 @@
version: 0.1
log:
level: debug
fields:
service: registry
storage:
delete:
enabled: true
cache:
blobdescriptor: inmemory
s3:
accesskey: accessKey1
secretkey: verySecretKey1
region: us-east-1
regionendpoint: http://127.0.0.1:9000
bucket: registry
encrypt: false
secure: false
v4auth: true
chunksize: 5242880
rootdirectory: /
http:
addr: 0.0.0.0:5000
headers:
X-Content-Type-Options: [nosniff]
Access-Control-Allow-Origin: ['http://127.0.0.1']
Access-Control-Allow-Methods: ['HEAD', 'GET', 'OPTIONS', 'DELETE']
Access-Control-Allow-Headers: ['Authorization']
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

View File

@ -0,0 +1,6 @@
#!/bin/sh
set -e
mkdir -p /data/registry
minio server /data