Skip to content

Commit

Permalink
Handle filename pattern change
Browse files Browse the repository at this point in the history
  • Loading branch information
xZero707 committed Sep 13, 2022
1 parent 9497a04 commit e4cfc98
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
ARG S6_OVERLAY_VERSION="3.0.0.2"
ARG S6_OVERLAY_RELEASE="https://github.com/just-containers/s6-overlay/releases/download/"
ARG S6_OVERLAY_BIN_PAK_EXT=".tar.xz"
ARG S6_OVERLAY_BASE_PAK_EXT=".tar.xz"

# First stage - Download s6-overlay noarch base and unpack it
FROM scratch AS downloader-s6-base
ARG S6_OVERLAY_VERSION
ARG S6_OVERLAY_RELEASE
ADD "${S6_OVERLAY_RELEASE}/v${S6_OVERLAY_VERSION}/s6-overlay-noarch-${S6_OVERLAY_VERSION}.tar.xz" /s6overlay-base.tar.xz
ARG S6_OVERLAY_BASE_PAK_EXT
ADD "${S6_OVERLAY_RELEASE}/v${S6_OVERLAY_VERSION}/s6-overlay-noarch${S6_OVERLAY_BASE_PAK_EXT}" /s6overlay-base.tar.xz


# Second stage - Download s6-overlay platform-dependent binaries and unpack
Expand All @@ -15,7 +17,7 @@ ARG TARGETPLATFORM
ARG S6_OVERLAY_VERSION
ARG S6_OVERLAY_RELEASE
ARG S6_OVERLAY_BIN_PAK_EXT
ARG S6_OVERLAY_RELEASE_URL="${S6_OVERLAY_RELEASE}/v${S6_OVERLAY_VERSION}/s6-overlay-${TARGETPLATFORM}-${S6_OVERLAY_BIN_PAK_EXT}"
ARG S6_OVERLAY_RELEASE_URL="${S6_OVERLAY_RELEASE}/v${S6_OVERLAY_VERSION}/s6-overlay-${TARGETPLATFORM}${S6_OVERLAY_BIN_PAK_EXT}"

RUN apk add --no-cache wget \
&& wget -O /s6overlay-bin.tar.xz "$(echo ${S6_OVERLAY_RELEASE_URL} | sed 's/linux\///g' | sed 's/amd64/x86_64/g' | sed 's/arm64/aarch64/g' | sed 's/arm\/v7/armhf/g')"
Expand Down
12 changes: 8 additions & 4 deletions build/docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ target "3_0_0_0" {
tags = ["docker.io/nlss/s6-rootfs:3.0.0.0", "docker.io/nlss/s6-rootfs:3.0.0.0-1"]
args = {
S6_OVERLAY_VERSION = "3.0.0.0-1"
S6_OVERLAY_BIN_PAK_EXT = "3.0.0.0-1.tar.xz"
S6_OVERLAY_BIN_PAK_EXT = "-3.0.0.0-1.tar.xz"
S6_OVERLAY_BASE_PAK_EXT = "-3.0.0.1-1.tar.xz"
}
}

Expand All @@ -72,7 +73,8 @@ target "3_0_0_1" {
tags = ["docker.io/nlss/s6-rootfs:3.0.0.1"]
args = {
S6_OVERLAY_VERSION = "3.0.0.1"
S6_OVERLAY_BIN_PAK_EXT = "3.0.0.1.tar.xz"
S6_OVERLAY_BIN_PAK_EXT = "-3.0.0.1.tar.xz"
S6_OVERLAY_BASE_PAK_EXT = "-3.0.0.1.tar.xz"
}
}

Expand All @@ -81,7 +83,8 @@ target "3_0_0_2" {
tags = ["docker.io/nlss/s6-rootfs:3.0.0.2"]
args = {
S6_OVERLAY_VERSION = "3.0.0.2"
S6_OVERLAY_BIN_PAK_EXT = "3.0.0.2.tar.xz"
S6_OVERLAY_BIN_PAK_EXT = "-3.0.0.2.tar.xz"
S6_OVERLAY_BASE_PAK_EXT = "-3.0.0.2.tar.xz"
}
}

Expand All @@ -90,7 +93,8 @@ target "3_0_0_2-2" {
tags = ["docker.io/nlss/s6-rootfs:3.0.0.2-2", "docker.io/nlss/s6-rootfs:3.0"]
args = {
S6_OVERLAY_VERSION = "3.0.0.2-2"
S6_OVERLAY_BIN_PAK_EXT = "3.0.0.2-2.tar.xz"
S6_OVERLAY_BIN_PAK_EXT = "-3.0.0.2-2.tar.xz"
S6_OVERLAY_BASE_PAK_EXT = "-3.0.0.2-2.tar.xz"
}
}

Expand Down

0 comments on commit e4cfc98

Please sign in to comment.