@@ -9,7 +9,8 @@ RUN apk add --no-cache curl gzip tar
99ARG acmesh_version=master
1010ARG acmesh_link="https://github.com/acmesh-official/acme.sh/archive/${acmesh_version}.tar.gz"
1111ARG 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
1314
1415# Download and place acme.sh inside the container
1516RUN mkdir -p "${acmesh_artifacts_dir}" \
@@ -18,18 +19,24 @@ RUN mkdir -p "${acmesh_artifacts_dir}" \
1819 && rm -rf "/tmp/acmesh-${acmesh_version}.tar.gz" \
1920 && "${acmesh_artifacts_dir}" /acme.sh --help
2021
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
2430
2531FROM alpine:latest
2632
2733ARG acmesh_artifacts_dir=/opt/acmesh
2834ARG auto_upgrade=0
2935ARG acme_working_dir=/usr/lib/acmesh
36+ ARG s6_artifacts_dir=/opt/s6
3037
3138COPY --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 " "/"
3340
3441# Set runtime variables
3542ENV LE_WORKING_DIR="$acme_working_dir"
0 commit comments