--- version: '3' volumes: data: {} services: registry: image: docker.io/registry volumes: - data:/var/lib/registry auth: image: docker.io/nginx environment: - "REGISTRY_URL=${REGISTRY_URL:-registry:5000}" - "REGISTRY_AUTH_FILE_ALL=${REGISTRY_AUTH_FILE_ALL:-./htpasswd}" volumes: - "${REGISTRY_AUTH_FILE_ALL:-./htpasswd}:/etc/nginx/htpasswd:ro" - "./templates:/etc/nginx/templates:ro" - "./nginx.conf:/etc/nginx/nginx.conf:ro" ports: - "${REGISTRY_HTTP_PORT:-8081}:80"