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.

73 lines
1.5 KiB

7 years ago
8 years ago
6 years ago
8 years ago
  1. FROM alpine:3.12
  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. ; do \
  51. 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} \
  52. ; done
  53. RUN printf "%b" '#!'"/usr/bin/env sh\n \
  54. if [ \"\$1\" = \"daemon\" ]; then \n \
  55. trap \"echo stop && killall crond && exit 0\" SIGTERM SIGINT \n \
  56. crond && while true; do sleep 1; done;\n \
  57. else \n \
  58. exec -- \"\$@\"\n \
  59. fi" >/entry.sh && chmod +x /entry.sh
  60. VOLUME /acme.sh
  61. ENTRYPOINT ["/entry.sh"]
  62. CMD ["--help"]