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.

78 lines
1.6 KiB

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