File tree Expand file tree Collapse file tree 2 files changed +29
-3
lines changed Expand file tree Collapse file tree 2 files changed +29
-3
lines changed Original file line number Diff line number Diff line change @@ -9,8 +9,19 @@ ENV CURL_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt
9
9
COPY ./files/.bashrc.acmesh /root/.bashrc
10
10
11
11
# acme.sh
12
- RUN mkdir -p /data/acme.sh \
13
- && curl -o /bin/acme.sh 'https://raw.githubusercontent.com/acmesh-official/acme.sh/master/acme.sh' \
14
- && chmod +x /bin/acme.sh
12
+ RUN curl -o /tmp/acme.sh 'https://raw.githubusercontent.com/acmesh-official/acme.sh/master/acme.sh' \
13
+ && chmod +x /tmp/acme.sh
14
+
15
+ ENV ACMESH_CONFIG_HOME=/data/.acme.sh/config \
16
+ ACMESH_HOME=/data/.acme.sh \
17
+ CERT_HOME=/data/.acme.sh/certs \
18
+ LE_CONFIG_HOME=/data/.acme.sh/config \
19
+ LE_WORKING_DIR=/data/.acme.sh
20
+
21
+ # this wrapper handles all the setup required for acme.sh and running commands for it
22
+ COPY ./files/acme.sh-wrapper /bin/acme.sh
23
+
24
+ # Test that the wrapper script is working
25
+ RUN /bin/acme.sh -h
15
26
16
27
LABEL org.label-schema.cmd="docker run --rm -ti nginxproxymanager/nginx-full:acmesh"
Original file line number Diff line number Diff line change
1
+ #! /bin/bash -e
2
+
3
+ # Ensure acme.sh dirs exist
4
+ mkdir -p " $ACMESH_HOME " " $ACMESH_CONFIG_HOME " " $CERT_HOME " " $LE_CONFIG_HOME " " $LE_WORKING_DIR "
5
+
6
+ ACMESH_SCRIPT=/data/.acme.sh/acme.sh
7
+
8
+ # Check for existence of $ACME_SH_SCRIPT
9
+ if ! [ -f " $ACMESH_SCRIPT " ]; then
10
+ echo " $ACMESH_SCRIPT does not exist, installing acme.sh ..."
11
+ cd /tmp
12
+ ./acme.sh --install --force --home " $ACMESH_HOME " --cert-home " $CERT_HOME " --config-home " $ACMESH_CONFIG_HOME "
13
+ fi
14
+
15
+ $ACMESH_SCRIPT --config-home " $ACMESH_CONFIG_HOME " " $@ "
You can’t perform that action at this time.
0 commit comments