Migrate old-style base scripts s6-rc (#202)

This commit is contained in:
Franck Nijhof 2022-12-10 13:48:38 +01:00 committed by GitHub
parent 6491ed138c
commit 6353b3ecc4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 17 additions and 8 deletions

View file

@ -20,14 +20,12 @@ ENV \
YARN_HTTP_TIMEOUT=1000000 \
TERM="xterm-256color"
# Copy root filesystem
COPY rootfs /
# Set shell
SHELL ["/bin/ash", "-o", "pipefail", "-c"]
# Install base system
ARG BUILD_ARCH=amd64
ARG S6_OVERLAY_VERSION="3.1.2.1"
RUN \
set -o pipefail \
\
@ -47,22 +45,21 @@ RUN \
jq=1.6-r2 \
tzdata=2022f-r1 \
\
&& S6_VERSION="3.1.2.1" \
&& S6_ARCH="${BUILD_ARCH}" \
&& if [ "${BUILD_ARCH}" = "i386" ]; then S6_ARCH="i686"; \
elif [ "${BUILD_ARCH}" = "amd64" ]; then S6_ARCH="x86_64"; \
elif [ "${BUILD_ARCH}" = "armv7" ]; then S6_ARCH="arm"; fi \
\
&& curl -L -s "https://github.com/just-containers/s6-overlay/releases/download/v${S6_VERSION}/s6-overlay-noarch.tar.xz" \
&& curl -L -s "https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-noarch.tar.xz" \
| tar -C / -Jxpf - \
\
&& curl -L -s "https://github.com/just-containers/s6-overlay/releases/download/v${S6_VERSION}/s6-overlay-${S6_ARCH}.tar.xz" \
&& curl -L -s "https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-${S6_ARCH}.tar.xz" \
| tar -C / -Jxpf - \
\
&& curl -L -s "https://github.com/just-containers/s6-overlay/releases/download/v${S6_VERSION}/s6-overlay-symlinks-noarch.tar.xz" \
&& curl -L -s "https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-symlinks-noarch.tar.xz" \
| tar -C / -Jxpf - \
\
&& curl -L -s "https://github.com/just-containers/s6-overlay/releases/download/v${S6_VERSION}/s6-overlay-symlinks-arch.tar.xz" \
&& curl -L -s "https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-symlinks-arch.tar.xz" \
| tar -C / -Jxpf - \
\
&& curl -J -L -o /tmp/bashio.tar.gz \
@ -83,6 +80,12 @@ RUN \
&& rm -f -r \
/tmp/*
# Copy root filesystem
COPY rootfs /
# Copy s6-overlay adjustments
COPY s6-overlay /package/admin/s6-overlay-${S6_OVERLAY_VERSION}/
# Entrypoint & CMD
ENTRYPOINT ["/init"]

View file

@ -1,4 +1,5 @@
#!/command/with-contenv bashio
# shellcheck shell=bash
# ==============================================================================
# Home Assistant Community Add-on: Base Images
# Displays a simple add-on banner on startup

View file

@ -1,4 +1,5 @@
#!/command/with-contenv bashio
# shellcheck shell=bash
# ==============================================================================
# Home Assistant Community Add-on: Base Images
# Sets the log level correctly

View file

@ -0,0 +1 @@
oneshot

View file

@ -0,0 +1 @@
/package/admin/s6-overlay/etc/s6-rc/scripts/base-addon-banner

View file

@ -0,0 +1 @@
oneshot

View file

@ -0,0 +1 @@
/package/admin/s6-overlay/etc/s6-rc/scripts/base-addon-log-level