version: '3'
services:
  docker-registry:
    image: registry:2
    restart : "no" 
    container_name: ${CONTAINER_NAME} 
    ports:
    - "8256:5000"
    environment:
      REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY: /data
    volumes:
      - ${DATA_ROOT}/data:/data
      - ${DATA_ROOT}/config/config.yml:/etc/docker/registry/config.yml

  docker-registry-ui:
    image: joxit/docker-registry-ui:latest 
    restart : "no" 
    container_name: ${CONTAINER_NAME}-ui
    ports:
    - 8255:80
    volumes:
      - ${DATA_ROOT}/nginx/nginx.conf:/etc/nginx/conf.d/default.conf
    environment:
      - SINGLE_REGISTRY=true
      - REGISTRY_TITLE=My Private Docker Registry
      - DELETE_IMAGES=true
      - SHOW_CONTENT_DIGEST=true
    depends_on:
      - docker-registry
