rpardini / docker-registry-proxy

An HTTPS Proxy for Docker providing centralized configuration and caching of any registry (quay.io, DockerHub, k8s.gcr.io)
Apache License 2.0
912 stars 170 forks source link

disable IPv6 via environment #130

Open moonbuggy opened 2 years ago

moonbuggy commented 2 years ago

I was having the same problem as in issue #108, but I'd prefer not to have to create a custom resolver configuration for Nginx. Things are simpler if entrypoint.sh handles things and the container sorts itself out.

This PR implements a check for the env variable and the appending of ipv6=off to the resolver string if appropriate. I've tried to keep it in line with your coding style elsewhere in entrypoint.sh.

There's also an addition to README.md regarding the variable, but I'm not sure what to do about the link I included there.

I was initially looking at the README.md in PR #109, so I linked to the Custom nginx resolvers configuration heading. That PR hasn't been merged yet, but I left the link in under the assumption it will become functional at some future point.

I'm just not sure if that's the best way to go about things..? I'm happy to remove the link and rebase this PR if you'd like.

iamkhalidbashir commented 1 year ago

this is good merge

perlboy commented 6 months ago

+1 on this, IPv6 ain't a fun time within corporate hub and spoke.

moonbuggy commented 1 month ago

Years later, now contemplating moving the container from amd64 to an arm32/arm64 swarm, the easiest way for me to get this PR included and deployed was to do a proper build from my fork and push it to Docker Hub.

Thus, in case it's useful for anyone else: https://hub.docker.com/r/moonbuggy2000/docker-registry-proxy