@@ -3,13 +3,14 @@ FROM alpine:latest as acmesh_artifacts
3
3
# os related operations below:
4
4
RUN apk -U --no-cache upgrade
5
5
6
- RUN apk add --no-cache curl gzip tar
6
+ RUN apk add --no-cache curl gzip tar util-linux
7
7
8
8
# Set ARGS
9
9
ARG acmesh_version=master
10
10
ARG acmesh_link="https://github.com/acmesh-official/acme.sh/archive/${acmesh_version}.tar.gz"
11
11
ARG acmesh_artifacts_dir=/opt/acmesh
12
- ARG s6_overlay_version=2.2.0.3
12
+ ARG s6_artifacts_dir=/opt/s6
13
+ ARG s6_overlay_version=3.1.0.0-1
13
14
14
15
# Download and place acme.sh inside the container
15
16
RUN mkdir -p "${acmesh_artifacts_dir}" \
@@ -18,18 +19,24 @@ RUN mkdir -p "${acmesh_artifacts_dir}" \
18
19
&& rm -rf "/tmp/acmesh-${acmesh_version}.tar.gz" \
19
20
&& "${acmesh_artifacts_dir}" /acme.sh --help
20
21
21
- # Download and install s6-overlay-builder
22
- ADD https://github.com/just-containers/s6-overlay/releases/download/v${s6_overlay_version}/s6-overlay-amd64-installer /tmp/
23
- RUN chmod +x /tmp/s6-overlay-amd64-installer
22
+ # Download and extract s6-overlay-builder
23
+ RUN CPU_ARCH=$(lscpu | grep Architecture | cut --field=2 --delimiter=":" | xargs) \
24
+ && curl --location --remote-header-name --output "/tmp/s6-overlay-noarch.tar.xz" \
25
+ https://github.com/just-containers/s6-overlay/releases/download/v${s6_overlay_version}/s6-overlay-noarch.tar.xz \
26
+ && curl --location --remote-header-name --output "/tmp/s6-overlay-${CPU_ARCH}.tar.xz" \
27
+ https://github.com/just-containers/s6-overlay/releases/download/v${s6_overlay_version}/s6-overlay-${CPU_ARCH}.tar.xz \
28
+ && tar -C ${s6_artifacts_dir} -Jxpf /tmp/s6-overlay-noarch.tar.xz \
29
+ && tar -C ${s6_artifacts_dir} -Jxpf /tmp/s6-overlay-x86_64.tar.xz
24
30
25
31
FROM alpine:latest
26
32
27
33
ARG acmesh_artifacts_dir=/opt/acmesh
28
34
ARG auto_upgrade=0
29
35
ARG acme_working_dir=/usr/lib/acmesh
36
+ ARG s6_artifacts_dir=/opt/s6
30
37
31
38
COPY --from=acmesh_artifacts "$acmesh_artifacts_dir" "$acmesh_artifacts_dir"
32
- COPY --from=acmesh_artifacts "/tmp/s6-overlay-amd64-installer " "/tmp/s6-overlay-amd64-installer "
39
+ COPY --from=acmesh_artifacts "$s6_artifacts_dir " "/"
33
40
34
41
# Set runtime variables
35
42
ENV LE_WORKING_DIR="$acme_working_dir"
0 commit comments