- 新增独立 certbot 服务项目 - nginx 配置添加 HTTPS 8443 端口监听 - frpc.toml HTTPS 代理指向 nginx:8443 - 支持自动续签并重载 nginx - 共享 Docker volume 传递证书
21 lines
600 B
Docker
21 lines
600 B
Docker
# Certbot 镜像 - Let's Encrypt 证书管理
|
|
FROM certbot/certbot:latest
|
|
|
|
LABEL maintainer="awei"
|
|
LABEL description="Let's Encrypt certificate management service"
|
|
|
|
# 安装额外工具
|
|
RUN apk add --no-cache curl bash
|
|
|
|
# 创建必要目录
|
|
RUN mkdir -p /var/www/certbot /etc/letsencrypt /var/log/letsencrypt
|
|
|
|
# 设置工作目录
|
|
WORKDIR /var/www/certbot
|
|
|
|
# 暴露端口(用于 ACME 验证)
|
|
EXPOSE 80
|
|
|
|
# 默认命令:启动 web 服务器用于 ACME 验证
|
|
CMD ["sh", "-c", "while true; do echo 'HTTP/1.1 200 OK\r\nContent-Type: text/plain\r\nContent-Length: 2\r\n\r\nOK' | nc -l -p 80; done"]
|