But since my dev environment runs in Docker, how would I test IPv6? I did some googling now and it seems that would not be an easy feat.
But since my dev environment runs in Docker, how would I test IPv6? I did some googling now and it seems that would not be an easy feat.
I assume your scenario is that you don't currently use IPv6, so you probably can't assign a subnet of your /48 block of IPv6 range to be routed to your docker host. You can probably use a subnet from a reserved range in that case, for example from: https://en.wikipedia.org/wiki/Unique_local_address
With that new subnet set up, you would at least be able to test the services running inside containers from that host itself.
In my own experience I never encountered services that don't work with IPv6 at all, but as others mentioned the most common issues are with truncated addresses in a db column designed for IPv4 or log parsers that refuse to match on IPv6. Worst case I found was a log based rate limiter that ignored IPv6 addresses and therefore let all requests using that stack pass.
Docker's documentation explains how to assign an IPv6 subnet to Docker: https://docs.docker.com/config/daemon/ipv6/ and https://docs.docker.com/network/bridge/#use-ipv6
You then can lookup a container's IPv6 address using 'docker inspect' and then directly connect to it from your host.
Docker's documentation
Yes, I looked at it and that is what I referred to with "No easy feat".docker run -p 127.0.0.1:80:80 ...
But with an IPv6 address? Which address would I use?
Although I don't know at what point that will test your application. I guess it will at least make sure that it can handle IPs such as "::1".
docker run -p [::1]:80:80 ..
And then how do I send a request to the container? I tried like this: wget 'http://[::1]:80'
But that gives me "connection refused".so you are already testing it :)
I get the same result when I run "ncat -6 -lp 80" inside the container and try to wget from the outside.
When I do the wget inside the container, I get "Connecting to [::1]:80... failed: Cannot assign requested address.".
As I said, reading around the net about "docker ipv6", it seems Docker is not IPv6 ready out of the box.