Mirror of acme.sh — A pure Unix shell script implementing ACME client protocol
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Dockerfile 1.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. FROM alpine:3.10
  2. RUN apk update -f \
  3. && apk --no-cache add -f \
  4. openssl \
  5. openssh-client \
  6. coreutils \
  7. bind-tools \
  8. curl \
  9. socat \
  10. tzdata \
  11. oath-toolkit-oathtool \
  12. tar \
  13. && rm -rf /var/cache/apk/*
  14. ENV LE_CONFIG_HOME /acme.sh
  15. ENV AUTO_UPGRADE 1
  16. #Install
  17. ADD ./ /install_acme.sh/
  18. RUN cd /install_acme.sh && ([ -f /install_acme.sh/acme.sh ] && /install_acme.sh/acme.sh --install || curl https://get.acme.sh | sh) && rm -rf /install_acme.sh/
  19. RUN ln -s /root/.acme.sh/acme.sh /usr/local/bin/acme.sh && crontab -l | grep acme.sh | sed 's#> /dev/null##' | crontab -
  20. RUN for verb in help \
  21. version \
  22. install \
  23. uninstall \
  24. upgrade \
  25. issue \
  26. signcsr \
  27. deploy \
  28. install-cert \
  29. renew \
  30. renew-all \
  31. revoke \
  32. remove \
  33. list \
  34. showcsr \
  35. install-cronjob \
  36. uninstall-cronjob \
  37. cron \
  38. toPkcs \
  39. toPkcs8 \
  40. update-account \
  41. register-account \
  42. create-account-key \
  43. create-domain-key \
  44. createCSR \
  45. deactivate \
  46. deactivate-account \
  47. set-notify \
  48. ; do \
  49. printf -- "%b" "#!/usr/bin/env sh\n/root/.acme.sh/acme.sh --${verb} --config-home /acme.sh \"\$@\"" >/usr/local/bin/--${verb} && chmod +x /usr/local/bin/--${verb} \
  50. ; done
  51. RUN printf "%b" '#!'"/usr/bin/env sh\n \
  52. if [ \"\$1\" = \"daemon\" ]; then \n \
  53. trap \"echo stop && killall crond && exit 0\" SIGTERM SIGINT \n \
  54. crond && while true; do sleep 1; done;\n \
  55. else \n \
  56. exec -- \"\$@\"\n \
  57. fi" >/entry.sh && chmod +x /entry.sh
  58. VOLUME /acme.sh
  59. ENTRYPOINT ["/entry.sh"]
  60. CMD ["--help"]