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.

76 lines
1.5 KiB

7 years ago
8 years ago
6 years ago
8 years ago
  1. FROM alpine:3.17
  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. jq \
  15. cronie
  16. ENV LE_CONFIG_HOME /acme.sh
  17. ARG AUTO_UPGRADE=1
  18. ENV AUTO_UPGRADE $AUTO_UPGRADE
  19. #Install
  20. COPY ./ /install_acme.sh/
  21. 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/
  22. RUN ln -s /root/.acme.sh/acme.sh /usr/local/bin/acme.sh && crontab -l | grep acme.sh | sed 's#> /dev/null##' | crontab -
  23. RUN for verb in help \
  24. version \
  25. install \
  26. uninstall \
  27. upgrade \
  28. issue \
  29. signcsr \
  30. deploy \
  31. install-cert \
  32. renew \
  33. renew-all \
  34. revoke \
  35. remove \
  36. list \
  37. info \
  38. showcsr \
  39. install-cronjob \
  40. uninstall-cronjob \
  41. cron \
  42. toPkcs \
  43. toPkcs8 \
  44. update-account \
  45. register-account \
  46. create-account-key \
  47. create-domain-key \
  48. createCSR \
  49. deactivate \
  50. deactivate-account \
  51. set-notify \
  52. set-default-ca \
  53. set-default-chain \
  54. ; do \
  55. 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} \
  56. ; done
  57. RUN printf "%b" '#!'"/usr/bin/env sh\n \
  58. if [ \"\$1\" = \"daemon\" ]; then \n \
  59. exec crond -n \n \
  60. else \n \
  61. exec -- \"\$@\"\n \
  62. fi\n" >/entry.sh && chmod +x /entry.sh
  63. VOLUME /acme.sh
  64. ENTRYPOINT ["/entry.sh"]
  65. CMD ["--help"]