-
Notifications
You must be signed in to change notification settings - Fork 170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add DISABLE_IPV6 to ignore AAAA records when proxying requests #142
base: master
Are you sure you want to change the base?
Conversation
Test workflow failed also against the master branch. Something possibly unrelated broke... |
Doh! Sorry, I missed your comment. I'll take a look shortly. |
Hi @deejgregor ! Did you have a chance to take a look at the check? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR fixes ghcr.io caching for me. I'm caching from my home internet connection, where I have IPv6 supported but have not configured Docker for this.
As well, neither lima / colima or Docker Desktop currently support IPv6. So, getting this in should help with those wanting to use this on a workstation.
@@ -102,6 +102,7 @@ ENV PROXY_REQUEST_BUFFERING="true" | |||
- PROXY_CONNECT_READ_TIMEOUT : see [proxy_connect_read_timeout](https://github.com/chobits/ngx_http_proxy_connect_module#proxy_connect_read_timeout) | |||
- PROXY_CONNECT_CONNECT_TIMEOUT : see [proxy_connect_connect_timeout](https://github.com/chobits/ngx_http_proxy_connect_module#proxy_connect_connect_timeout) | |||
- PROXY_CONNECT_SEND_TIMEOUT : see [proxy_connect_send_timeout](https://github.com/chobits/ngx_http_proxy_connect_module#proxy_connect_send_timeout)) | |||
- Env `DISABLE_IPV6`: If you have problems with `nginx` attempting to connect to hosts over IPv6 but your network doesn't properly support IPv6, set this to `true` to ignore IPv6 AAAA records in DNS responses. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Env `DISABLE_IPV6`: If you have problems with `nginx` attempting to connect to hosts over IPv6 but your network doesn't properly support IPv6, set this to `true` to ignore IPv6 AAAA records in DNS responses. | |
- Env `DISABLE_IPV6`: If you have problems with `nginx` attempting to connect to hosts over IPv6 but your network doesn't properly support IPv6, set this to `true` to ignore IPv6 AAAA records in DNS responses. If you see errors like `failed (99: Address not available) while connecting to upstream` and images are not caching properly, try this setting. |
@@ -25,7 +25,11 @@ echo "DEBUG, determined RESOLVERS from /etc/resolv.conf: '$RESOLVERS'" | |||
conf="" | |||
for ONE_RESOLVER in ${RESOLVERS}; do | |||
echo "Possible resolver: $ONE_RESOLVER" | |||
conf="resolver $ONE_RESOLVER; " | |||
if [[ "a${DISABLE_IPV6}" == "atrue" ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious, is prepending a
a trick to avoid having to check if the variable is empty, or something else?
Hi, any chance we can get this fix released? Thank you. |
I was getting signal 11 crashes from nginx with
docker-registry-proxy versions 0.6.2 and 0.6.4 (test performed pulling
ubuntu
throughdocker-registry-proxy
without it being in the cache):Leading to image pull errors in Docker and Kubernetes, e.g.:
With the latest code in master, I get failures like instead of signal 11, but it sometimes seems to work, however:
If I set
DISABLE_IPV6=true
with this change, it works just fine, no errors like shown above.