Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You mean something like this:

docker run -p 127.0.0.1:80:80 ...

But with an IPv6 address? Which address would I use?



If I recall correctly, you can do "docker run -p [::1]:80:80 .." (::1 is the equivalent to 127.0.0.1).

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".


I used to type ::1:9092 to connect to my Kafka brokers on my laptop. Best shortcut ever.


that would suggest your app isn't listening on the v6 address

so you are already testing it :)


I don't think so.

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.


That is correct - please first enable ipv6 and assign it a subnet in your /etc/docker/daemon.json, then restart the service. Details at: https://docs.docker.com/config/daemon/ipv6/




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: