2020-02-21 00:52:43 +00:00
|
|
|
|
#!/bin/bash -e
|
|
|
|
|
|
|
|
|
|
# Note: This script is designed to be run inside a Docker Build for a container
|
|
|
|
|
|
|
|
|
|
CYAN='\E[1;36m'
|
|
|
|
|
YELLOW='\E[1;33m'
|
|
|
|
|
BLUE='\E[1;34m'
|
|
|
|
|
GREEN='\E[1;32m'
|
|
|
|
|
RESET='\E[0m'
|
|
|
|
|
|
2023-05-08 22:15:44 +00:00
|
|
|
|
S6_OVERLAY_VERSION=3.1.5.0
|
2023-03-16 22:50:32 +00:00
|
|
|
|
TARGETPLATFORM=${1:unspecified}
|
2020-02-21 00:52:43 +00:00
|
|
|
|
|
|
|
|
|
# Determine the correct binary file for the architecture given
|
|
|
|
|
case $TARGETPLATFORM in
|
|
|
|
|
linux/arm64)
|
|
|
|
|
S6_ARCH=aarch64
|
|
|
|
|
;;
|
|
|
|
|
|
|
|
|
|
linux/arm/v7)
|
|
|
|
|
S6_ARCH=armhf
|
|
|
|
|
;;
|
|
|
|
|
|
|
|
|
|
*)
|
2023-03-16 22:50:32 +00:00
|
|
|
|
S6_ARCH=x86_64
|
2020-02-21 00:52:43 +00:00
|
|
|
|
;;
|
|
|
|
|
esac
|
|
|
|
|
|
|
|
|
|
echo -e "${BLUE}❯ ${CYAN}Installing S6-overlay v${S6_OVERLAY_VERSION} for ${YELLOW}${TARGETPLATFORM} (${S6_ARCH})${RESET}"
|
|
|
|
|
|
2023-03-16 22:50:32 +00:00
|
|
|
|
curl -L -o '/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 -L -o "/tmp/s6-overlay-${S6_ARCH}.tar.xz" "https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-${S6_ARCH}.tar.xz"
|
|
|
|
|
tar -C / -Jxpf '/tmp/s6-overlay-noarch.tar.xz'
|
|
|
|
|
tar -C / -Jxpf "/tmp/s6-overlay-${S6_ARCH}.tar.xz"
|
|
|
|
|
|
|
|
|
|
rm -rf "/tmp/s6-overlay-${S6_ARCH}.tar.xz"
|
2020-02-21 00:52:43 +00:00
|
|
|
|
|
|
|
|
|
echo -e "${BLUE}❯ ${GREEN}S6-overlay install Complete${RESET}"
|