Files
common-server-public/certbot/Dockerfile
张威33321 fb87be680d 0908
2026-09-08 20:36:17 +08:00

20 lines
768 B
Docker
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Certbot 镜像 - Let's Encrypt 证书管理
#
# 【重要】官方 certbot/certbot 镜像的 ENTRYPOINT 是 ["certbot"],这里不要覆盖
# ENTRYPOINT 或 CMD。一旦覆盖容器启动命令会变成 `certbot <你的 CMD>`
# certbot 无法解析而退出。正确用法是把容器当一次性任务跑:
# docker compose run --rm certbot certonly ...
# docker compose run --rm certbot renew
FROM certbot/certbot:v5.8.0
LABEL maintainer="awei"
LABEL description="Let's Encrypt certificate management service"
# 调试用工具(如需 DNS-01 验证,在此追加 pip install certbot-dns-xxx
RUN apk add --no-cache curl bash
# 创建必要目录
RUN mkdir -p /var/www/certbot /etc/letsencrypt /var/log/letsencrypt
WORKDIR /var/www/certbot