certbot docker Let's Encrypt

Step

1
2
3
docker run -it --rm -p 80:80 -p 443:443 \
-v $(pwd)/letsencrypt:/etc/letsencrypt \
quay.io/letsencrypt/letsencrypt auth

运行成功后,如下提示

1
2
3
4
5
6
How would you like to authenticate with the ACME CA?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: Spin up a temporary webserver (standalone)
2: Place files in webroot directory (webroot)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate number [1-2] then [enter] (press 'c' to cancel):

选择1,然后输入Email地址

1
2
3
Plugins selected: Authenticator standalone, Installer None
Enter email address (used for urgent renewal and security notices) (Enter 'c' to
cancel):

同意协议

1
2
3
4
5
6
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please read the Terms of Service at
https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf. You must
agree in order to register with the ACME server at
https://acme-v02.api.letsencrypt.org/directory
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

最后接着输入你的domain,然后生成证书

One Step

1
2
3
4
5
docker run --rm -p 80:80 -p 443:443 \
-v $(pwd)/letsencrypt:/etc/letsencrypt \
quay.io/letsencrypt/letsencrypt auth \
--standalone -m someone@email.com --agree-tos \
-d your.domain1.com -d your.domain2.com