Enable IPv6 connectivity for the kamal network#1381
Enable IPv6 connectivity for the kamal network#1381frenkel wants to merge 2 commits intobasecamp:mainfrom
Conversation
|
The integration tests are failing with "Error response from daemon: could not find an available, non-overlapping IPv6 address pool among the defaults to assign to the network". This might just be from running docker inside docker, but it highlights that maybe this isn't a safe change in all contexts. From the latest changes in main, the pre-deploy hook will always run before attempting to create the network, so the best solution here might be to use that to create a kamal network with whatever options you want. |
|
Indeed, you would need some options in your docker file (or pass them as arguments). Hadn't thought about that and locally I did have those probably. pre-deploy seems like a better solution, thanks for the hint! You might want to close #1280 then as well. |
|
So neither of the PRs addressing this appear to have been merged, or have I missed something? |
|
@disbelief did you read the comments in the closed PR? |
|
Just create the kamal network yourself with the ipv6 option before deploying anything and you're good to go. You might need to enable some options in daemon.json, like this: |
|
The CI failure that led to closing this PR no longer reproduces. It was caused by Docker < 27.0 lacking automatic IPv6 address pool allocation. Docker 27.0 (released June 2024) introduced automatic ULA allocation, so I've verified this on a fork — all CI jobs pass The suggested workaround (pre-creating the network via a hook) has a discoverability problem: https://kamal-deploy.org/docs/ does not mention that Kamal creates a The |
Based on #1280 I've updated the tests as well.
This change is needed if you want to receive the client IPv6 address in your Rails app. Without it you'll only get the IPv4 address of the docker proxy (172.x.x.x).