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.

59 lines
1.2 KiB

  1. FROM alpine
  2. RUN apk update -f \
  3. && apk --no-cache add -f \
  4. openssl \
  5. curl \
  6. netcat-openbsd
  7. ENV LE_CONFIG_HOME /acme.sh
  8. ENV AUTO_UPGRADE 1
  9. #Install
  10. RUN mkdir -p /install_acme.sh/
  11. ADD ./ /install_acme.sh/
  12. RUN cd /install_acme.sh && ([ -f /install_acme.sh/acme.sh ] && /install_acme.sh/acme.sh --install || curl https://get.acme.sh | sh)
  13. RUN rm -rf /install_acme.sh/
  14. RUN ln -s /root/.acme.sh/acme.sh /usr/local/bin/acme.sh
  15. RUN for verb in help \
  16. version \
  17. install \
  18. uninstall \
  19. upgrade \
  20. issue \
  21. signcsr \
  22. deploy \
  23. install-cert \
  24. renew \
  25. renew-all \
  26. revoke \
  27. remove \
  28. list \
  29. showcsr \
  30. install-cronjob \
  31. uninstall-cronjob \
  32. cron \
  33. toPkcs \
  34. toPkcs8 \
  35. update-account \
  36. register-account \
  37. create-account-key \
  38. create-domain-key \
  39. createCSR \
  40. deactivate \
  41. ; do \
  42. 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} \
  43. ; done
  44. RUN printf "%b" '#!'"/usr/bin/env sh\n \
  45. if [ \"\$1\" = \"daemon\" ]; then \n \
  46. crond; tail -f /dev/null;\n \
  47. else \n \
  48. /root/.acme.sh/acme.sh --config-home /acme.sh \"\$@\"\n \
  49. fi" >/entry.sh && chmod +x /entry.sh
  50. ENTRYPOINT ["/entry.sh"]
  51. CMD ["--help"]