
如果你使用 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 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
This code consists on a few components:
It should support most architectures, however, I just built it for amd64 and arm64v8.
Here are some example snippets to help you get started creating a container.
yaml--- version: '2.1' services: cloudflare-ddns: image: luisnabais/cloudflare-ddns:1.3.0 container_name: cloudflare-ddns hostname: cloudflare-ddns environment: - EMAIL=example@mail.com - API_KEY=a8dd892bd2a0a69187358b1ce7f7cabc2f85 - HOSTNAME=home.example.com - ZONE_ID=6ef3e0abc8ad776905a522c2ceb6f7d0 - RECORD_ID=99ebe0933256654a8f0ec19d2a16fa50 - TTL=600 restart: unless-stopped
bashdocker run -d \ --name=cloudflare-ddns \ -e EMAIL=example@mail.com \ -e API_KEY=a8dd892bd2a0a69187358b1ce7f7cabc2f85 \ -e HOSTNAME=home.example.com \ -e ZONE_ID=6ef3e0abc8ad776905a522c2ceb6f7d0 \ -e RECORD_ID=99ebe0933256654a8f0ec19d2a16fa50 \ -e TTL=600 \ --restart unless-stopped \ luisnabais/cloudflare-ddns:1.3.0
The variables are expected to be environment variables, so first they need to be exported. You can use a basic shell script or just execute the commands (mind that executing the commands keeps them in history, if they are not cleaned up after).
bashexport EMAIL="example@mail.com" export API_KEY="a8dd892bd2a0a69187358b1ce7f7cabc2f85" export HOSTNAME="home.example.com" export ZONE_ID="6ef3e0abc8ad776905a522c2ceb6f7d0" export RECORD_ID="99ebe0933256654a8f0ec19d2a16fa50" export TTL="600" ./update_ddns.py
| Parameter | Function |
|---|---|
-e EMAIL=example@mail.com | CloudFlare E-mail. |
-e API_KEY=a8dd892bd2a0a69187358b1ce7f7cabc2f85 | Account global CloudFlare API Key. |
-e HOSTNAME=home.example.com | The hostname/DNS to update. |
-e ZONE_ID=6ef3e0abc8ad776905a522c2ceb6f7d0 | The Zone ID where the hostname is. It can be checked on the CloudFlare account. |
-e RECORD_ID=99ebe0933256654a8f0ec19d2a16fa50 | The Record ID for the entry to update. Run once the script manually without record id as parameter, it will return all records, just get the record ID to insert here. |
-e TTL=600 | The interval in seconds to update the DNS entry. 600 is 10 minutes. |
Below are the instructions for updating containers:
docker-compose pull
docker-compose pull cloudflare-ddnsdocker-compose up -d
docker-compose up -d cloudflare-ddnsUpdate the image: docker pull luisnabais/cloudflare-ddns:1.3.0
Stop the running container: docker stop cloudflare-ddns
Delete the container: docker rm cloudflare-ddns
Recreate a new container with the same docker run parameters as instructed above.
You can also remove the old dangling images: docker image prune
If you want to make local modifications to these images for development purposes or just to customize the logic:
bashgit clone https://github.com/luisnabais/docker-cloudflare-ddns.git cd docker-cloudflare-ddns docker build \ --no-cache \ --pull \ -t luisnabais/cloudflare-ddns:1.3.0 .
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务