Wobak
1
Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. crt.sh | example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.
Hello,
I am facing an error after a while when I use the docker container in a Dockerfile.
Here is my docker file :
FROM certbot/certbot:latest
RUN pip install --upgrade pip
RUN pip install certbot-plugin-gandi
RUN pip install certbot-dns-infomaniak
RUN pip install certbot-dns-ovh
RUN pip install certbot-dns-cloudflare
The build works fine :
[+] Building 8.5s (10/10) FINISHED docker:default
=> [certbot internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 305B 0.0s
=> [certbot internal] load metadata for docker.io/certbot/certbot:latest 0.4s
=> [certbot internal] load .dockerignore 0.0s
=> => transferring context: 128B 0.0s
=> CACHED [certbot 1/6] FROM docker.io/certbot/certbot:latest@sha256:4d8875e85a2af373262914e15c0a149e1985c5bbd05ac433fe4763f465020fcf 0.0s
=> [certbot 2/6] RUN pip install --upgrade pip 0.6s
=> [certbot 3/6] RUN pip install certbot-plugin-gandi 3.1s
=> [certbot 4/6] RUN pip install certbot-dns-infomaniak 0.7s
=> [certbot 5/6] RUN pip install certbot-dns-ovh 2.0s
=> [certbot 6/6] RUN pip install certbot-dns-cloudflare 1.5s
=> [certbot] exporting to image 0.1s
=> => exporting layers 0.1s
=> => writing image sha256:d108ff26543a38b3d1248b6b020c5e578ef28a8bc1186b10e2e798690c250d7c 0.0s
=> => naming to docker.io/library/certbot-certbot 0.0s
But then, when I try to use it, I get the following error :
root @ master: /opt/docker/certbot 15 # docker compose -f $CERTBOT_HOME/docker-compose.yml run --rm certbot renew
Traceback (most recent call last):
File "/usr/local/lib/python3.12/importlib/metadata/__init__.py", line 397, in from_name
return next(cls.discover(name=name))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
StopIteration
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/bin/certbot", line 33, in <module>
sys.exit(load_entry_point('certbot', 'console_scripts', 'certbot')())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/bin/certbot", line 22, in importlib_load_entry_point
for entry_point in distribution(dist_name).entry_points
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/importlib/metadata/__init__.py", line 862, in distribution
return Distribution.from_name(distribution_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/importlib/metadata/__init__.py", line 399, in from_name
raise PackageNotFoundError(name)
importlib.metadata.PackageNotFoundError: No package metadata was found for certbot
Usually when this happens I rebuild the image, and then re-run it.
But now I just can't get it to run
Thanks for your help !
2 Likes
MikeMcQ
2
Just letting you know you may need to post this at the EFF github for Certbot. I personally don't know docker and pip well enough to dig into this. While we often help with Certbot problems on this Let's Encrypt forum something this unusual about the install is probably best directed to the EFF dev team.
Some other volunteer here may still offer help. Just making sure you knew about this other option
2 Likes