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.

69 lines
1.5 KiB

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