]> git.proxmox.com Git - mirror_acme.sh.git/blame - Dockerfile
make sure _url gets set where it is needed
[mirror_acme.sh.git] / Dockerfile
CommitLineData
d8042289 1FROM alpine:3.12
f3b43439 2
447bf77d 3RUN 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 \
447bf77d 14 libidn
f3b43439 15
16ENV LE_CONFIG_HOME /acme.sh
17
fcb6198a 18ARG AUTO_UPGRADE=1
f3b43439 19
05477c1a
PL
20ENV AUTO_UPGRADE $AUTO_UPGRADE
21
f3b43439 22#Install
6f732a99 23COPY ./ /install_acme.sh/
df037db0 24RUN 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/
25
f3b43439 26
7902d10a 27RUN ln -s /root/.acme.sh/acme.sh /usr/local/bin/acme.sh && crontab -l | grep acme.sh | sed 's#> /dev/null##' | crontab -
f3b43439 28
49bdcad4 29RUN for verb in help \
f3b43439 30 version \
31 install \
32 uninstall \
33 upgrade \
34 issue \
35 signcsr \
36 deploy \
37 install-cert \
38 renew \
39 renew-all \
40 revoke \
41 remove \
42 list \
43 showcsr \
44 install-cronjob \
45 uninstall-cronjob \
46 cron \
47 toPkcs \
48 toPkcs8 \
49 update-account \
50 register-account \
51 create-account-key \
52 create-domain-key \
53 createCSR \
54 deactivate \
20028725 55 deactivate-account \
2b765fde 56 set-notify \
8d0e4851 57 set-default-ca \
f3b43439 58 ; do \
59 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} \
60 ; done
61
7883cc58 62RUN printf "%b" '#!'"/usr/bin/env sh\n \
63if [ \"\$1\" = \"daemon\" ]; then \n \
9dd62ae0 64 trap \"echo stop && killall crond && exit 0\" SIGTERM SIGINT \n \
65 crond && while true; do sleep 1; done;\n \
7883cc58 66else \n \
9dd62ae0 67 exec -- \"\$@\"\n \
7883cc58 68fi" >/entry.sh && chmod +x /entry.sh
69
c487cd6a 70VOLUME /acme.sh
71
7883cc58 72ENTRYPOINT ["/entry.sh"]
f3b43439 73CMD ["--help"]