NginxProxyManager / nginx-proxy-manager

Docker container for managing Nginx proxy hosts with a simple, powerful interface
https://nginxproxymanager.com
MIT License
23.19k stars 2.69k forks source link

Certbot in 2.10.4 has a broken dependency #3243

Open jerry-yuan opened 1 year ago

jerry-yuan commented 1 year ago

Checklist

Describe the bug I have deployed a watchtower container, which can upgrade container version automatically. Three months ago, I requested some ssl certs by npm's old version, while these certs expired in recent days. I try to renew them via npm, while I got an internal error with these log:

[10/7/2023] [1:22:06 AM] [SSL      ] › ✖  error     Error: Command failed: certbot renew --non-interactive --quiet --config "/etc/letsencrypt.ini" --work-dir "/tmp/letsencrypt-lib" --logs-dir "/tmp/letsencrypt-log" --preferred-challenges "dns,http" --disable-hook-validation  
An unexpected error occurred:
    at ChildProcess.exithandler (node:child_process:402:12)
ModuleNotFoundError: No module named 'zope'
    at maybeClose (node:internal/child_process:1100:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5)
Connection Error: Error: Connection lost: The server closed the connection.
    at ChildProcess.emit (node:events:513:28)

Certbot requested for a python module zope which was mission in npm image!

Nginx Proxy Manager Version 2.10.4

To Reproduce Steps to reproduce the behavior: Just renew a ssl cert, maybe request a new cert also can reproduce.

Expected behavior Just make certbot work well.

Operating System Ubuntu 22.04 with docker 23.0.0

Additional context I have solved this issue by execute pip install zope inside the docker. Maybe this issue was introduced by bumping version of certbot, and you need to change some configuration file like Dockerfile to add this module?

sbkg0002 commented 1 year ago

PR with fix https://github.com/NginxProxyManager/nginx-proxy-manager/pull/2756

jerry-yuan commented 1 year ago

PR with fix https://github.com/NginxProxyManager/nginx-proxy-manager/pull/2756

nice work.

ichenhe commented 1 year ago

Since the PR has not been merged, you can simply build your own image based on the official one. If you use docker-compose, this operation should be very easy.

  1. Create a Dockerfile file in the same dir of docker-compose.yaml:
    FROM jc21/nginx-proxy-manager
    RUN pip install --no-cache-dir zope
    # for mainland china, better to use pip mirrors:
    # RUN pip install --no-cache-dir zope -i  https://mirrors.aliyun.com/pypi/simple/
  2. Update the docker-compose.yaml to build our own image:
    version: '3.8'
    services:
    app:
    # image: jc21/nginx-proxy-manager
    build: . # you can specify the location of the Dockerfile.
    container_name: nginx-proxy-manager
    restart: unless-stopped
OnlyTL commented 1 year ago

由于 PR 尚未合并,您可以简单地根据官方图像构建自己的图像。如果你使用 docker-compose,这个操作应该很容易。

  1. 在与 : 的相同目录中创建一个文件:Dockerfile``docker-compose.yaml
FROM jc21/nginx-proxy-manager
RUN pip install --no-cache-dir zope
# for mainland china, better to use pip mirrors:
# RUN pip install --no-cache-dir zope -i  https://mirrors.aliyun.com/pypi/simple/
  1. 更新 以构建我们自己的映像:docker-compose.yaml
version: '3.8'
services:
  app:
    # image: jc21/nginx-proxy-manager
    build: . # you can specify the location of the Dockerfile.
    container_name: nginx-proxy-manager
    restart: unless-stopped

this help me

duanghuang commented 1 year ago

Since the PR has not been merged, you can simply build your own image based on the official one. If you use docker-compose, this operation should be very easy.

  1. Create a Dockerfile file in the same dir of docker-compose.yaml:
FROM jc21/nginx-proxy-manager
RUN pip install --no-cache-dir zope
# for mainland china, better to use pip mirrors:
# RUN pip install --no-cache-dir zope -i  https://mirrors.aliyun.com/pypi/simple/
  1. Update the docker-compose.yaml to build our own image:
version: '3.8'
services:
  app:
    # image: jc21/nginx-proxy-manager
    build: . # you can specify the location of the Dockerfile.
    container_name: nginx-proxy-manager
    restart: unless-stopped

niubility!

github-actions[bot] commented 5 months ago

Issue is now considered stale. If you want to keep it open, please comment :+1: