version: "2.3"
services:
 registry:
  image: registry:2
  ports:
    - "5000:5000"
  volumes:
    - /root/ssl:/ssl:ro
    - ./data:/data
  restart: always
  environment:
    - REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=/data
    - REGISTRY_AUTH=token
    - REGISTRY_AUTH_TOKEN_REALM=https://tx-fileserver.cloudam.cn:5001/auth
    - REGISTRY_AUTH_TOKEN_SERVICE="auth.docker.com"
    - REGISTRY_AUTH_TOKEN_ISSUER="AuthService"
    - REGISTRY_AUTH_TOKEN_ROOTCERTBUNDLE=/ssl/ssl.pem
    - REGISTRY_HTTP_TLS_CERTIFICATE=/ssl/ssl.pem
    - REGISTRY_HTTP_TLS_KEY=/ssl/ssl.key
 dockerauth:
   image: cesanta/docker_auth
   ports:
     - "5001:5001"
   volumes:
     - ./:/config:ro
     - /root/ssl:/ssl:ro
     - ./extensions:/extensions
   command: -alsologtostderr=true -log_dir=/logs /config/extAuth.yml
   restart: always
