
如果你使用 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 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
Lazy-ACME is a daemon that automates TLS certificate acquisition and renewal using Let's Encrypt and the lego client. It simplifies certificate management for your domains with support for various DNS providers.
src/: Source code directory.
acme.rs: Handles certificate acquisition and renewal logic.config.rs: Manages configuration loading and updates.handlers.rs: Defines REST API endpoints.init.rs: Initializes configuration files and directories.main.rs: Application entry point.response.rs: Formats API responses.server.rs: Sets up the Axum web server.state.rs: Manages shared application state.tasks.rs: Handles background tasks for certificate checks and renewals..env.example: Template for environment variables.build.sh: Script to download the lego ***ary.docker-compose.yml: Docker Compose configuration for deployment.Dockerfile: Instructions for building the Docker image.Makefile: Automates building and pushing Docker images.config.toml: Maps domains to DNS providers (created on first run).[provider].dns.toml: DNS provider configuration (e.g., cloudflare.dns.toml).Pull the Image:
bashdocker pull canmi/lazy-acme:latest
Configure Environment:
Copy .env.example to .env and set variables:
bashcp .env.example .env
Edit .env:
bashLOG_LEVEL=info UPDATE_INTERVAL_HOURS=24 DIR_PATH=/opt/lazy-acme BIND_PORT=33301
Set Up Configuration:
On first run, Lazy-ACME creates config.toml and cloudflare.dns.toml in DIR_PATH. Edit these files:
config.toml:
toml[[domains]] name = "example.com" dns_provider = "cloudflare"
cloudflare.dns.toml:
tomlapi_key = "YOUR_CLOUDFLARE_API_TOKEN" email = "your-email@example.com" ca = "https://acme-v02.api.letsencrypt.org/directory"
Run with Docker Compose:
Use the provided docker-compose.yml:
yamlservices: lazy-acme: image: canmi/lazy-acme:latest container_name: lazy-acme networks: - internal ports: - "33301:33301/tcp" env_file: - ./.env volumes: - /opt/lazy-acme:/root/lazy-acme restart: unless-stopped networks: internal: driver: bridge
Start the service:
bashdocker-compose up -d
Access the API:
The service runs on http://127.0.0.1:33301. Use endpoints like:
POST /v1/certificate: Request a certificate.GET /v1/certificate/{domain}: Retrieve a certificate.GET /v1/certificate/{domain}/key: Retrieve a certificate key.To build and push a multi-architecture Docker image:
bashmake push
This command uses docker buildx to create and push images for linux/amd64 and linux/arm64 to the Docker registry.
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务