mirror of
https://github.com/hassio-addons/addon-base.git
synced 2025-05-07 04:11:24 +00:00
Migrate old-style base scripts s6-rc (#202)
This commit is contained in:
parent
6491ed138c
commit
6353b3ecc4
12 changed files with 17 additions and 8 deletions
|
@ -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"]
|
||||
|
||||
|
|
|
@ -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
|
|
@ -1,4 +1,5 @@
|
|||
#!/command/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
# ==============================================================================
|
||||
# Home Assistant Community Add-on: Base Images
|
||||
# Sets the log level correctly
|
1
base/s6-overlay/etc/s6-rc/sources/base-addon-banner/type
Normal file
1
base/s6-overlay/etc/s6-rc/sources/base-addon-banner/type
Normal file
|
@ -0,0 +1 @@
|
|||
oneshot
|
1
base/s6-overlay/etc/s6-rc/sources/base-addon-banner/up
Normal file
1
base/s6-overlay/etc/s6-rc/sources/base-addon-banner/up
Normal file
|
@ -0,0 +1 @@
|
|||
/package/admin/s6-overlay/etc/s6-rc/scripts/base-addon-banner
|
|
@ -0,0 +1 @@
|
|||
oneshot
|
|
@ -0,0 +1 @@
|
|||
/package/admin/s6-overlay/etc/s6-rc/scripts/base-addon-log-level
|
Loading…
Add table
Add a link
Reference in a new issue