
如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。
只需在 AI 对话中先发送下面这句话即可:
请先完整阅读并严格遵守以下文档中的全部规则与要求:
https://xuanyuan.cloud/agents.md
在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
Dnsmasq docker image for popular resolvers. Select prefered upstream DNS resolver without additional configuration.
$ docker build -t dnsmasq .
While creating the container, pass the prefered upstream DNS resolver as additional argument. Currently supported upstream DNS are :
$ docker run -dit -p 53:53/tcp -p 53:53/udp --cap-add=NET_ADMIN --name my-resolver cloudcontainer/dnsmasq <google | opendns | cloudflare | quad9>
Note: If upstream is not specified, then container uses the IPs in the target host's /etc/resolv.conf file as upstream servers.
Example
$ docker run -dit --cap-add=NET_ADMIN --name my-resolver dnsmasq google
my-resolver is the name of Docker container created with above example.my-resolver container. This image name was used the above Docker build section.my-resolver container.The container will listen on all available network interface.
Once the container is running, update the /etc/resolv.conf file with the IP of the base host where my-resolver container is running (or just 127.0.0.1 if requierd only on localhost).
Daemon and query logs are enabled. docker logs my-resolver command will display dnsmasq's logs.
Example
$ sudo docker run -dit -p 53:53/tcp -p 53:53/udp --name my-resolver cloudcontainer/dnsmasq opendns c581acc5807788f21423e565e8e6160da126d2155ea4ca8477490eea961773e6 $ dig +short @127.0.0.1 hub.docker.com # Query on loop-back address elb-default.us-east-1.aws.dckr.io. us-east-1-elbdefau-1nlhaqqbnj2z8-140214243.us-east-1.elb.amazonaws.com. 3.220.14.115 52.72.152.117 52.72.182.154 $ dig +short @192.168.122.20 docker.com # Query on host's IP address 52.72.182.154 3.220.14.115 52.72.152.117 $ sudo docker logs my-resolver # Will display the logs of above dig commands dnsmasq[6]: started, version 2.81 cachesize 150 dnsmasq[6]: compile time options: IPv6 GNU-getopt no-DBus no-UBus no-i18n no-IDN DHCP DHCPv6 no-Lua TFTP no-conntrack ipset auth no-DNSSEC loop-detect inotify dumpfile dnsmasq[6]: reading /opt/dnsmasq/opendns-resolver dnsmasq[6]: using nameserver 208.67.222.222#53 dnsmasq[6]: using nameserver 208.67.220.220#53 dnsmasq[6]: read /etc/hosts - 7 addresses dnsmasq[6]: query[A] hub.docker.com from 172.17.0.1 dnsmasq[6]: forwarded hub.docker.com to 208.67.222.222 dnsmasq[6]: forwarded hub.docker.com to 208.67.220.220 dnsmasq[6]: reply hub.docker.com is <CNAME> dnsmasq[6]: reply elb-default.us-east-1.aws.dckr.io is <CNAME> dnsmasq[6]: reply us-east-1-elbdefau-1nlhaqqbnj2z8-140214243.us-east-1.elb.amazonaws.com is 3.220.14.115 dnsmasq[6]: reply us-east-1-elbdefau-1nlhaqqbnj2z8-140214243.us-east-1.elb.amazonaws.com is 52.72.152.117 dnsmasq[6]: reply us-east-1-elbdefau-1nlhaqqbnj2z8-140214243.us-east-1.elb.amazonaws.com is 52.72.182.154 dnsmasq[6]: query[A] docker.com from 192.168.122.20 dnsmasq[6]: forwarded docker.com to 208.67.222.222 dnsmasq[6]: forwarded docker.com to 208.67.220.220 dnsmasq[6]: reply docker.com is 52.72.182.154 dnsmasq[6]: reply docker.com is 3.220.14.115 dnsmasq[6]: reply docker.com is 52.72.152.117
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务
以下是 cloudcontainer/dnsmasq 相关的常用 Docker 镜像,适用于 不同场景 等不同场景: