Skip to content

some question about htpasswd auth standalone #434

Description

@lanyur

I followed the example of docker-registry-ui/examples/ui-as-standalone/credentials.yml
but it couldn't utilize the authentication feature.

services:
  registry:
    image: registry:latest
    container_name : registry
    ports:
      - 5000:5000
    restart: always
    privileged: true
    volumes:
      - /data/docker-registry:/var/lib/registry
      - ./config/credentials.yml:/etc/docker/registry/config.yml
      - ./config/htpasswd:/etc/docker/registry/htpasswd

  ui:
    image: joxit/docker-registry-ui:latest
    container_name: registry-web
    ports:
      - 8000:80
    environment:
      - REGISTRY_TITLE=SWJ Docker Registry
      - NGINX_PROXY_PASS_URL=http://registry:5000
      # - REGISTRY_URL=http://registry:5000
      - DELETE_IMAGES=true
      - SINGLE_REGISTRY=true
    depends_on:
      - registry
    links:
      - registry:registry
    restart: always
    privileged: true

I must add the following configuration to the environment variable node in the registry container definition.

   environment:
      - REGISTRY_AUTH_HTPASSWD_REALM=basic-realm
      - REGISTRY_AUTH_HTPASSWD_PATH=/etc/docker/registry/htpasswd
      - REGISTRY_STORAGE_DELETE_ENABLED=true

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions