Created
April 30, 2021 12:27
-
-
Save dahoba/50bec0966e4ec54e3cad52d9163bf680 to your computer and use it in GitHub Desktop.
TLS request with acme.sh docker example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env bash | |
set -e | |
# used cf information of api enabled domain name | |
# export CF_Key="<number>" | |
# export CF_Email="<email>" | |
export CF_Account_ID=<acccount-id> | |
export CF_Token="<api-token>" | |
# add cname record at target | |
# | |
# _acme-challenge.example.com | |
# => _acme-challenge.aliasDomainForValidationOnly.com | |
# | |
docker run --rm -it \ | |
-e "CF_Account_ID=$CF_Account_ID" \ | |
-e "CF_Token=$CF_Token" \ | |
-v "$(pwd)/certs":/acme.sh \ | |
--net=host \ | |
neilpang/acme.sh --issue \ | |
-d <tld; example.com> \ | |
--challenge-alias <api-enabled.tld> --dns dns_cf \ | |
-d <wild-card-tld; *.example.com> \ | |
--log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment