docker run
docker run --rm -itd \
-v "$(pwd)/out":/acme.sh \
-e CF_Email="xxxxxxxxxxxxxxxxxx@gmail.com" \
-e CF_Key="xxxxxxxxxxxxxxxxxx" \
--net=host \
--name=acme.sh \
neilpang/acme.sh daemon
docker-compose
docker-compose.yml
version: '3'
services:
acme-sh:
image: neilpang/acme.sh
container_name: acme.sh
restart: always
command: daemon
environment:
- CF_Key="xxxxxxxxxxxxxxxxxx"
- CF_Email=xxxxxxxxxxxxxxxxxx@gmail.com"
volumes:
- /data/acme:/acme.sh
network_mode: host
issue
acme.sh --register-account -m my@example.com
docker exec acme.sh --issue --dns dns_cf -d sundayhk.com -d *.sundayhk.com --debug
#docker exec acme.sh --install-cert --reloadcmd "systemctl reload nginx" -d $domain --key-file /data/ssl/$domain.key --fullchain-file /data/ssl/$domain.pem
docker exec acme.sh --install-cert -d $domain --key-file /data/ssl/$domain.key --fullchain-file /data/ssl/$domain.pem
cron
crontab -e
0 0 * * * docker exec acme.sh --cron