Skip to content

Commit

Permalink
Upgrading s6 in alpine to 3.0.0.2-2
Browse files Browse the repository at this point in the history
* Installation method is being updated
  • Loading branch information
komailo committed Feb 27, 2022
1 parent aa0dc92 commit 2fe7041
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions alpinelinux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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}" \
Expand All @@ -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"
Expand Down

0 comments on commit 2fe7041

Please sign in to comment.