chris81t
(Chris81t)
January 31, 2023, 9:17pm
1
Hi,
I want to create a docker compose file (portainer) to get the following image running:
docker run --rm \
-v /var/lib/letsencrypt:/var/lib/letsencrypt \
-v /etc/letsencrypt:/etc/letsencrypt \
--cap-drop=all \
miigotu/certbot-dns-godaddy certbot certonly \
--authenticator dns-godaddy \
--dns-godaddy-propagation-seconds 900 \
--dns-godaddy-credentials /var/lib/letsencrypt/godaddy_credentials.ini \
--keep-until-expiring --non-interactive --expand \
--server https://acme-v02.api.letsencrypt.org/directory \
--agree-tos --email "webmaster@example.com" \
-d example.com -d '*.example.com'
I’ve got the snippet from following project documentation github > certbot-dns-godaddy .
My first try was to use the web app/service Composerize but sadly an incomplete compose is the result.
Is there another way to get a valid compose file? How can I identify, if something like
--agree-tos --email "webmaster@example.com"
is an environment variable or a command or something else?
Any help is welcome
Thank you!
Christian
meyay
(Metin Y.)
January 31, 2023, 9:21pm
2
Please share your work in progress state of your compose file. It should be rather simple, as everything after the image name belongs underneath the command:
key
1 Like
meyay
(Metin Y.)
January 31, 2023, 9:35pm
3
This is the translation of the docker run command to a compose file:
version: '3.8'
services:
certbot:
image: miigotu/certbot-dns-godaddy
cap_drop:
- ALL
volumes:
- '/var/lib/letsencrypt:/var/lib/letsencrypt'
- '/etc/letsencrypt:/etc/letsencrypt'
command: >
certbot certonly
--authenticator dns-godaddy
--dns-godaddy-propagation-seconds 900
--dns-godaddy-credentials /var/lib/letsencrypt/godaddy_credentials.ini
--keep-until-expiring --non-interactive --expand
--server https://acme-v02.api.letsencrypt.org/directory
--agree-tos --email "webmaster@example.com"
-d example.com -d '*.example.com'
Just add new lines to the command block. As it indicates that all lines should be merged to a single line with the >
character in the beginning, you can simply add additional parameters. BUT: you have to make sure the certbot
binary inside the image actually understands the arguments and the value.
1 Like
chris81t
(Chris81t)
January 31, 2023, 9:56pm
4
@meyay thank you for your feedback!
I will check this tomorrow.
Cheers!
chris81t
(Chris81t)
February 2, 2023, 9:57pm
5
@meyay :
Today I have tested your compose.yml after adaption and it works like a charm.
THANK YOU