diff --git a/alpinelinux/Dockerfile b/alpinelinux/Dockerfile index 41a3ea7..b881b74 100644 --- a/alpinelinux/Dockerfile +++ b/alpinelinux/Dockerfile @@ -9,7 +9,8 @@ RUN apk add --no-cache curl gzip tar ARG acmesh_version=master ARG acmesh_link="https://github.com/acmesh-official/acme.sh/archive/${acmesh_version}.tar.gz" ARG acmesh_artifacts_dir=/opt/acmesh -ARG s6_overlay_version=2.2.0.3 +ARG s6_artifacts_dir=/opt/s6 +ARG s6_overlay_version=3.1.0.0-1 # Download and place acme.sh inside the container RUN mkdir -p "${acmesh_artifacts_dir}" \ @@ -18,18 +19,24 @@ RUN mkdir -p "${acmesh_artifacts_dir}" \ && rm -rf "/tmp/acmesh-${acmesh_version}.tar.gz" \ && "${acmesh_artifacts_dir}"/acme.sh --help -# Download and install s6-overlay-builder -ADD https://github.com/just-containers/s6-overlay/releases/download/v${s6_overlay_version}/s6-overlay-amd64-installer /tmp/ -RUN chmod +x /tmp/s6-overlay-amd64-installer +# Download and extract s6-overlay-builder +RUN CPU_ARCH=$(lscpu | grep Architecture | cut --field=2 --delimiter=":" | xargs) \ + && curl --location --remote-header-name --output "/tmp/s6-overlay-noarch.tar.xz" \ + https://github.com/just-containers/s6-overlay/releases/download/v${s6_overlay_version}/s6-overlay-noarch.tar.xz \ + && curl --location --remote-header-name --output "/tmp/s6-overlay-${CPU_ARCH}.tar.xz" \ + https://github.com/just-containers/s6-overlay/releases/download/v${s6_overlay_version}/s6-overlay-${CPU_ARCH}.tar.xz \ + && tar -C ${s6_artifacts_dir} -Jxpf /tmp/s6-overlay-noarch.tar.xz \ + && tar -C ${s6_artifacts_dir} -Jxpf /tmp/s6-overlay-x86_64.tar.xz FROM alpine:latest ARG acmesh_artifacts_dir=/opt/acmesh ARG auto_upgrade=0 ARG acme_working_dir=/usr/lib/acmesh +ARG s6_artifacts_dir=/opt/s6 COPY --from=acmesh_artifacts "$acmesh_artifacts_dir" "$acmesh_artifacts_dir" -COPY --from=acmesh_artifacts "/tmp/s6-overlay-amd64-installer" "/tmp/s6-overlay-amd64-installer" +COPY --from=acmesh_artifacts "$s6_artifacts_dir" "/" # Set runtime variables ENV LE_WORKING_DIR="$acme_working_dir"