FROM ubuntu:20.04
RUN apt-get update && \
apt-get install -y curl socat && \
apt-get clean
RUN curl
https://get.acme.sh | sh
ENV CF_API_EMAIL your_email@example.com
ENV CF_API_KEY your_cloudflare_api_key
RUN /root/.acme.sh/
acme.sh --issue --dns dns_cf -d
yourdomain.com -d '*.yourdomain.com' && \
/root/.acme.sh/
acme.sh --install-cert -d
yourdomain.com \
--key-file /path/to/your/keyfile.key \
--fullchain-file /path/to/your/fullchain.cer
RUN apt-get purge -y curl && apt-get autoremove -y
CMD ["tail", "-f", "/dev/null"]
简单写了写,自己改改吧