Skip to content

Commit 96d84c7

Browse files
committed
Upgrading s6 in alpine to 3.0.0.2-2
* Installation method is being updated
1 parent aa0dc92 commit 96d84c7

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

alpinelinux/Dockerfile

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@ FROM alpine:latest as acmesh_artifacts
33
# os related operations below:
44
RUN apk -U --no-cache upgrade
55

6-
RUN apk add --no-cache curl gzip tar
6+
RUN apk add --no-cache curl gzip tar util-linux
77

88
# Set ARGS
99
ARG acmesh_version=master
1010
ARG acmesh_link="https://github.com/acmesh-official/acme.sh/archive/${acmesh_version}.tar.gz"
1111
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
1314

1415
# Download and place acme.sh inside the container
1516
RUN 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

2531
FROM alpine:latest
2632

2733
ARG acmesh_artifacts_dir=/opt/acmesh
2834
ARG auto_upgrade=0
2935
ARG acme_working_dir=/usr/lib/acmesh
36+
ARG s6_artifacts_dir=/opt/s6
3037

3138
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" "/"
3340

3441
# Set runtime variables
3542
ENV LE_WORKING_DIR="$acme_working_dir"

0 commit comments

Comments
 (0)