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.

61 lines
1.2 KiB

8 years ago
8 years ago
8 years ago
8 years ago
  1. FROM alpine
  2. RUN apk update -f \
  3. && apk --no-cache add -f \
  4. openssl \
  5. curl \
  6. netcat-openbsd \
  7. && rm -rf /var/cache/apk/*
  8. ENV LE_CONFIG_HOME /acme.sh
  9. ENV AUTO_UPGRADE 1
  10. #Install
  11. ADD ./ /install_acme.sh/
  12. 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/
  13. RUN ln -s /root/.acme.sh/acme.sh /usr/local/bin/acme.sh
  14. RUN for verb in help \
  15. version \
  16. install \
  17. uninstall \
  18. upgrade \
  19. issue \
  20. signcsr \
  21. deploy \
  22. install-cert \
  23. renew \
  24. renew-all \
  25. revoke \
  26. remove \
  27. list \
  28. showcsr \
  29. install-cronjob \
  30. uninstall-cronjob \
  31. cron \
  32. toPkcs \
  33. toPkcs8 \
  34. update-account \
  35. register-account \
  36. create-account-key \
  37. create-domain-key \
  38. createCSR \
  39. deactivate \
  40. ; do \
  41. 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} \
  42. ; done
  43. RUN printf "%b" '#!'"/usr/bin/env sh\n \
  44. if [ \"\$1\" = \"daemon\" ]; then \n \
  45. crond -f\n \
  46. else \n \
  47. /root/.acme.sh/acme.sh --config-home /acme.sh \"\$@\"\n \
  48. fi" >/entry.sh && chmod +x /entry.sh
  49. VOLUME /acme.sh
  50. ENTRYPOINT ["/entry.sh"]
  51. CMD ["--help"]