4 ms·
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
by mgbmtl 5y ago
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".
- TekMol 5y agodocker 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".
- blibble 5y agothat would suggest your app isn't listening on the v6 address so you are already testing it :)
- TekMol 5y agoI 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.
- El_RIDO 5y agoThat 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/ https://docs.docker.com/config/daemon/ipv6/
- eb0la 5y agoI used to type ::1:9092 to connect to my Kafka brokers on my laptop. Best shortcut ever.