0

I am trying to deploy a private docker registry that supports IPv6. I followed the steps here to define my IPv6 address.

docker-compose.yml

version: '2.1'

services:
  registry:
    restart: always
    image: registry:2
    ports:
      - "5000:5000"
    environment:
      REGISTRY_AUTH: htpasswd
      REGISTRY_AUTH_HTPASSWD_REALM: Registry
      REGISTRY_AUTH_HTPASSWD_PATH: /auth/registry.password
      REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY: /data
    volumes:
      - ./auth:/auth
      - ./data:/data
    networks:
      dock_net:
        ipv6_address: 2001:db8::10
networks:
  dock_net:
    enable_ipv6: true
    driver: bridge
    ipam:
      driver: default
      config:
        - subnet: 2001:db8::/32
          gateway: 2001:db8::1

As far as I can tell it "works". A docker inspect shows the global IP address as the one I defined. I can ping the address, but if I issue curl -u username:password http://[<ipv6 address>]:5000/v2/_catalog on the host system (the one hosting the repository) it fails with no route to host.

Is there a step I missed during setup?

AndyReifman
  • 1,459
  • 4
  • 18
  • 34
  • You have a bad address. `2001:197:2:1:12` is not a valid IPv6 address. – Ron Maupin Apr 15 '20 at 14:22
  • Sorry, that's just an example address, not the actual one I'm using. I'll update. – AndyReifman Apr 15 '20 at 14:23
  • 1
    IANA has set aside a range, `2001:db8::/32`, to use for example addresses. If you are using example, rather than actual, addresses, then please use addresses in that range so that we know you mean example addresses. – Ron Maupin Apr 15 '20 at 14:35

1 Answers1

0

If need to be accessible from internet - you can put it behind cloudflare, and it will be accessible from both ipv6 and ipv4.