-
-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
missing folder fails the script. #20
Comments
Hi, Could you please share how you start your container. It sound like you are creating a bind mount, which will obscure the existing content inside the container. In that case you will need to either manually create that folder before startup, or you could create a startup script like this: mkdir -p /etc/letsencrypt/dhparams name it something like //Jonas |
Hello,
And, I had no mounting folder in the working directory, it was clean. I just tried that again to make sure, and it doesnt work: I have made a container like this: FROM jonasal/nginx-certbot:latest root@node1:~/temptest# docker run -p 80:80 -p 443:443 --env [email protected] -v $(pwd)/nginx_secrets:/etc/letsencrypt --name nginx-certbot docker.pkg.github.com/pmkyl/rb_nginx/rb_nginx:cb01-1 Couldn't find keyfile '/etc/letsencrypt/live/rb.codes/privkey.pem' for '/etc/nginx/conf.d/rb.codes.conf' Couldn't find fullchain '/etc/letsencrypt/live/rb.codes/fullchain.pem' for '/etc/nginx/conf.d/rb.codes.conf' Couldn't find chain '/etc/letsencrypt/live/rb.codes/chain.pem' for '/etc/nginx/conf.d/rb.codes.conf' Couldn't find dhparam '/etc/letsencrypt/dhparams/dhparam.pem' for '/etc/nginx/conf.d/rb.codes.conf' Important file(s) for '/etc/nginx/conf.d/rb.codes.conf' are missing, disabling... Starting the Nginx service Starting the certbot autorenewal service RENEWAL_INTERVAL unset, using default of '8d' Couldn't find the dhparam file '/etc/letsencrypt/dhparams/dhparam.pem'; creating it... DHPARAM_SIZE unset, using default of 2048 bits %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % ATTENTION! % % % % This script will now create a 2048 bit Diffie-Hellman % % parameter to use during the SSL handshake. % % % % >>>>> This MIGHT take a VERY long time! <<<<< % % (Took 65 minutes for 4096 bit on an old 3GHz CPU) % % % % However, there is some randomness involved so it might % % be both faster or slower for you. 2048 is secure enough % % for today and quite fast to generate. These files will % % only have to be created once so please be patient. % % A message will be displayed when this process finishes. % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Will now output to the following file: '/etc/letsencrypt/dhparams/dhparam.pem' Can't open /etc/letsencrypt/dhparams/dhparam.pem for writing, No such file or directory 139674556036224:error:02001002:system library:fopen:No such file or directory:../crypto/bio/bss_file.c:69:fopen('/etc/letsencrypt/dhparams/dhparam.pem','w') 139674556036224:error:2006D080:BIO routines:BIO_new_file:no such file:../crypto/bio/bss_file.c:76: |
Ah, excellent. Thank you for all the information, I see now why this happens. The certbot program has a default set of folders which it creates if any are missing. The A suggestion might be that I include the |
Thank you for reporting this, it made me find another bug as well! |
Hello, |
Works perfect ! Thanks alot ! 👍 |
it cannot find folder dhparams, and script fails. On ubuntu 20.04
mkdir -p nginx_secrets/dhparams
The text was updated successfully, but these errors were encountered: