
pndlm/proxy本镜像整合HAProxy(高性能负载均衡器与反向代理)和Certbot(Let's Encrypt证书管理工具),旨在简化HTTPS服务部署流程,实现SSL证书的自动获取、更新及反向代理配置,适用于需要安全访问的Web应用场景。
| 标签 | 说明 | 推荐程度 |
|---|---|---|
v3/latest | 基于Ubuntu Focal,包含Certbot 0.4 | 推荐 |
bullseye | 基于Debian Bullseye/Sid,包含Certbot 1.x | 备选 |
stretch | 基于Debian Stretch的原始版本,已过时 | 不推荐 |
bashdocker run -d \ --name haproxy-certbot \ -p 80:80 \ -p 443:443 \ -v /path/to/haproxy.cfg:/etc/haproxy/haproxy.cfg \ -v /path/to/certbot-data:/etc/letsencrypt \ -e DOMAINS="example.com,[***]" \ -e EMAIL="***" \ your-image-name:latest
yamlversion: '3' services: haproxy-certbot: image: your-image-name:latest ports: - "80:80" - "443:443" volumes: - ./haproxy.cfg:/etc/haproxy/haproxy.cfg - ./certbot-data:/etc/letsencrypt environment: - DOMAINS=example.com,[***] - EMAIL=*** restart: unless-stopped
| 变量名 | 说明 | 示例值 |
|---|---|---|
| DOMAINS | 需申请证书的域名,多个域名用逗号分隔 | "example.com,[***]" |
| Certbot注册***(用于证书通知) | "***" |
将自定义的haproxy.cfg文件挂载到容器内/etc/haproxy/haproxy.cfg路径,配置示例:
frontend http_front bind *:80 acl letsencrypt-acl path_beg /.well-known/acme-challenge/ use_backend certbot-backend if letsencrypt-acl redirect scheme https code 301 if !{ ssl_fc } frontend https_front bind *:443 ssl crt /etc/letsencrypt/live/example.com/fullchain.pem default_backend web-backend backend certbot-backend server certbot 127.0.0.1:8080 backend web-backend server web1 192.168.1.100:80 check
stretch标签版本已过时,建议使用v3/latest或bullseye版本

manifest unknown 错误
TLS 证书验证失败
DNS 解析超时
410 错误:版本过低
402 错误:流量耗尽
身份认证失败错误
429 限流错误
凭证保存错误
来自真实用户的反馈,见证轩辕镜像的优质服务