【发布时间】:2021-12-19 15:24:33
【问题描述】:
所以我正在关注本教程how to secure a containerized nod js app。我能够达到他们生成证书的地步。当我运行以下命令docker-compose up --force-recreate --no-deps certbot 时,我遇到了
附加到 certbot certbot |似乎有问题 那个地址。输入电子邮件地址(用于 certbot | 紧急 更新和安全通知) certbot |证书机器人 |证书机器人
|如果你真的想跳过这个,你可以用 certbot 运行客户端 | --register-unsafely-without-email 但您将无法 收到通知 certbot |关于即将到期或撤销 您的证书或 certbot 的问题 |你的 Certbot 安装将导致无法续订。证书机器人 | 证书机器人 | (输入'c'取消):将调试日志保存到 /var/log/letsencrypt/letsencrypt.log certbot |意外 发生错误:certbot | EOFError 证书机器人 |寻求帮助或 在https://community.letsencrypt.org 搜索解决方案。见 logfile /var/log/letsencrypt/letsencrypt.log 或使用 -v 重新运行 Certbot 更多细节。 certbot 以代码 1 退出
docker-compose.yml 中的命令如下。
command: certonly --webroot --webroot-path=/var/www/html --email sammy@example.local --agree-tos --no-eff-email --register-unsafely-without-email --force-renewal -d example.local -d www.example.local
您可以看到 --register-unsafely-without-email。
对nginx.conf进行必要的调整后,webserver出现错误
nginx:[emerg] 无法加载证书“/etc/letsencrypt/live/example.local/fullchain.pem”
然后我注释掉了新添加的 nginx.conf 上下文。然后我进入 webserver 容器检查 live 文件夹是否存在。毫无疑问,/etc/letsencrypt 中没有文件夹。
有什么解决方案可以让这个命令工作?
- 我只需要这个用于本地开发,所以保持简单是理想的。
- 我确实需要 SSH。
【问题讨论】:
标签: docker nginx ssh docker-compose certbot