diff --git a/compose/config/registry-mirror-config.yml b/compose/config/registry-mirror-config.yml new file mode 100644 index 0000000..004cac6 --- /dev/null +++ b/compose/config/registry-mirror-config.yml @@ -0,0 +1,22 @@ +version: 0.1 +log: + fields: + service: registry +storage: + cache: + blobdescriptor: inmemory + filesystem: + rootdirectory: /var/lib/registry + delete: + enabled: true +http: + addr: :5000 + headers: + X-Content-Type-Options: [nosniff] +health: + storagedriver: + enabled: true + interval: 10s + threshold: 3 +proxy: + remoteurl: https://registry-1.docker.io \ No newline at end of file diff --git a/swarm/registry.yml b/swarm/registry.yml new file mode 100644 index 0000000..1e21291 --- /dev/null +++ b/swarm/registry.yml @@ -0,0 +1,20 @@ +services: + + registry-mirror: + image: registry:2 + networks: + - traefik-public + deploy: + labels: + - traefik.frontend.rule=Host:register.${DOMAIN?Variable not set} + - traefik.docker.network=traefik-public + - traefik.port=5000 + ports: + - 5000:5000 + volumes: + - /var/data/registry/registry-mirror-data:/var/lib/registry + - /var/data/registry/registry-mirror-config.yml:/etc/docker/registry/config.yml + +networks: + traefik-public: + external: true \ No newline at end of file