curl / curl-container

curl images
MIT License
61 stars 12 forks source link

Option `--dns-servers` not supported #59

Open mschaefers opened 2 months ago

mschaefers commented 2 months ago

docker run --rm mirror.gcr.io/curlimages/curl:latest curl --dns-servers 8.8.8.8 https://google.com

fails with

curl: option --dns-servers: the installed libcurl version doesn't support this
curl: try 'curl --help' or 'curl --manual' for more information

man page states --dns-servers requires that the underlying libcurl was built to support c-ares.

was c-ares support dropped on purpose? Does a workaround or an alternative image exist?

ahmadalkhansa commented 3 weeks ago

It seems that the image was built using enabled threaded resolver instead. According to the dependencies section in the everything curl book, threaded resolver is a substitute to c-ares that does all the asynchronous name resolution within the same thread.