version: '3'

services:
  registry-ui:
    image: joxit/docker-registry-ui:latest
    restart : always
    ports:
     - 8085:80
    environment:
     - SINGLE_REGISTRY=false
     - REGISTRY_TITLE=Geumdo Docker Registry UI
     - DELETE_IMAGES=true
     - SHOW_CONTENT_DIGEST=true
     - NGINX_PROXY_PASS_URL=http://118.45.160.139:5001
     - REGISTRY_URL=http://118.45.160.139:5001
     - CATALOG_MIN_BRANCHES=1
     - CATALOG_MAX_BRANCHES=1
     - REGISTRY_SECURED=false
     - CATALOG_ELEMENTS_LIMIT=1000
    container_name : registry-ui
    network_mode: bridge
    depends_on:
     - registry
  registry:
    image: registry:latest
    restart: always
    ports:
      - 5001:5000
    volumes:
      - ./registry/data:/var/lib/registry
    environment:
        REGISTRY_HTTP_HEADERS_Access-Control-Allow-Origin: '["*"]'
        REGISTRY_HTTP_HEADERS_Access-Control-Allow-Methods: '["HEAD,GET,OPTIONS,DELETE"]'
        REGISTRY_HTTP_HEADERS_Access-Control-Allow-Credentials: '["true"]'
        REGISTRY_HTTP_HEADERS_Access-Control-Allow-Headers: '["Authorization,Accept,Cache-Control"]'
        REGISTRY_HTTP_HEADERS_Access-Control-Expose-Headers: '["Docker-Content-Digest"]'
        REGISTRY_STORAGE_DELETE_ENABLED: 'true'
    container_name: registry
    network_mode: bridge
