version: '3.3'

services:
  registry:
    image: registry:2
    container_name: private-registry
    restart: unless-stopped
    ports:
      - "5000:5000"
    environment:
      # 启用认证（需要创建htpasswd文件）
      #- REGISTRY_AUTH=htpasswd
      #- REGISTRY_AUTH_HTPASSWD_REALM=Registry Realm
      #- REGISTRY_AUTH_HTPASSWD_PATH=/auth/htpasswd
      # 存储配置
      - REGISTRY_HTTP_TLS_CERTIFICATE=/full.pem
      - REGISTRY_HTTP_TLS_KEY=/key.pem
      #- REGISTRY_STORAGE_DELETE_ENABLED=true  # 允许删除镜像
    volumes:
      # 数据持久化
      - ./registry-data:/var/lib/registry
      # 认证文件
      #- ./auth:/auth
      #共享证书文件
      - /home/wen/docker/fy93cn/letsencrypt/fy93/fullchain.pem:/full.pem
      - /home/wen/docker/fy93cn/letsencrypt/fy93/privkey.pem:/key.pem





