]>
Commit | Line | Data |
---|---|---|
5a51454d | 1 | FROM alpine:3.16.3 |
f3b43439 | 2 | |
447bf77d | 3 | RUN apk --no-cache add -f \ |
f3b43439 | 4 | openssl \ |
05acf28e | 5 | openssh-client \ |
8259e827 | 6 | coreutils \ |
552710ac | 7 | bind-tools \ |
f3b43439 | 8 | curl \ |
de692d3d | 9 | sed \ |
a6b39928 | 10 | socat \ |
2cf01c23 | 11 | tzdata \ |
e0d4115e | 12 | oath-toolkit-oathtool \ |
561803c0 | 13 | tar \ |
dca9def4 RS |
14 | libidn \ |
15 | jq | |
f3b43439 | 16 | |
17 | ENV LE_CONFIG_HOME /acme.sh | |
18 | ||
fcb6198a | 19 | ARG AUTO_UPGRADE=1 |
f3b43439 | 20 | |
05477c1a PL |
21 | ENV AUTO_UPGRADE $AUTO_UPGRADE |
22 | ||
f3b43439 | 23 | #Install |
6f732a99 | 24 | COPY ./ /install_acme.sh/ |
df037db0 | 25 | 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/ |
26 | ||
f3b43439 | 27 | |
7902d10a | 28 | RUN ln -s /root/.acme.sh/acme.sh /usr/local/bin/acme.sh && crontab -l | grep acme.sh | sed 's#> /dev/null##' | crontab - |
f3b43439 | 29 | |
49bdcad4 | 30 | RUN for verb in help \ |
f3b43439 | 31 | version \ |
32 | install \ | |
33 | uninstall \ | |
34 | upgrade \ | |
35 | issue \ | |
36 | signcsr \ | |
37 | deploy \ | |
38 | install-cert \ | |
39 | renew \ | |
40 | renew-all \ | |
41 | revoke \ | |
42 | remove \ | |
43 | list \ | |
c39e6c44 | 44 | info \ |
f3b43439 | 45 | showcsr \ |
46 | install-cronjob \ | |
47 | uninstall-cronjob \ | |
48 | cron \ | |
49 | toPkcs \ | |
50 | toPkcs8 \ | |
51 | update-account \ | |
52 | register-account \ | |
53 | create-account-key \ | |
54 | create-domain-key \ | |
55 | createCSR \ | |
56 | deactivate \ | |
20028725 | 57 | deactivate-account \ |
2b765fde | 58 | set-notify \ |
8d0e4851 | 59 | set-default-ca \ |
dbdcbd4b | 60 | set-default-chain \ |
f3b43439 | 61 | ; do \ |
62 | 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} \ | |
63 | ; done | |
64 | ||
7883cc58 | 65 | RUN printf "%b" '#!'"/usr/bin/env sh\n \ |
66 | if [ \"\$1\" = \"daemon\" ]; then \n \ | |
9dd62ae0 | 67 | trap \"echo stop && killall crond && exit 0\" SIGTERM SIGINT \n \ |
c31027b2 SYC |
68 | crond && sleep infinity &\n \ |
69 | wait \n \ | |
7883cc58 | 70 | else \n \ |
9dd62ae0 | 71 | exec -- \"\$@\"\n \ |
7883cc58 | 72 | fi" >/entry.sh && chmod +x /entry.sh |
73 | ||
c487cd6a | 74 | VOLUME /acme.sh |
75 | ||
7883cc58 | 76 | ENTRYPOINT ["/entry.sh"] |
f3b43439 | 77 | CMD ["--help"] |