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.

74 lines
1.5 KiB

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