diff --git a/addons_updater/Dockerfile b/addons_updater/Dockerfile index a02fc6a80..a72cedbc0 100644 --- a/addons_updater/Dockerfile +++ b/addons_updater/Dockerfile @@ -6,7 +6,7 @@ VOLUME [ "/data" ] #Install last version https://github.com/dvershinin/lastversion ENV PACKAGES="git moreutils" RUN \ - apk add --no-cache $PACKAGES \ + apk add --no-cache ${PACKAGES} \ && pip install --upgrade pip \ && pip install lastversion diff --git a/arpspoof/rootfs/scripts/00-aaa_dockerfile_backup.sh b/arpspoof/rootfs/scripts/00-aaa_dockerfile_backup.sh index d036f5468..612e26d7e 100644 --- a/arpspoof/rootfs/scripts/00-aaa_dockerfile_backup.sh +++ b/arpspoof/rootfs/scripts/00-aaa_dockerfile_backup.sh @@ -10,8 +10,8 @@ if [ ! -f "/usr/bin/bashio" ]; then apt-get clean \ && apt-get update \ - && apt-get install -y $PACKAGES 2>/dev/null \ - || apk add --no-cache $PACKAGES + && apt-get install -y --no-install-recommends ${PACKAGES} 2>/dev/null \ + || apk add --no-cache ${PACKAGES} ################### # Install bashio # diff --git a/bazarr/Dockerfile b/bazarr/Dockerfile index e35614a94..6a919c58e 100644 --- a/bazarr/Dockerfile +++ b/bazarr/Dockerfile @@ -2,27 +2,18 @@ ARG BUILD_FROM ARG BUILD_VERSION FROM ${BUILD_FROM} ENV BASHIO_VERSION=0.14.3 +ENV PACKAGES="jq \ + curl \ + cifs-utils \ + keyutils \ + samba \ + samba-client" RUN \ ############################### # Install apps test both dist # ############################### - apt-get clean \ - && apt-get update \ - && apt-get install -y \ - jq \ - curl \ - cifs-utils \ - keyutils \ - samba \ - smbclient \ - || apk add --no-cache \ - jq \ - curl \ - cifs-utils \ - keyutils \ - samba \ - samba-client \ + apk add --no-cache ${PACKAGES} \ \ ################## # Install bashio # @@ -32,7 +23,7 @@ RUN \ | tar -xzf - --strip 1 -C /tmp/bashio \ && mv /tmp/bashio/lib /usr/lib/bashio \ && ln -s /usr/lib/bashio/bashio /usr/bin/bashio \ - && rm -rf /tmp/bashio + && rm -rf /tmp/bashio || true RUN \ # Correct config folder diff --git a/bazarr/root/etc/cont-init.d/00-aaa_dockerfile_backup.sh b/bazarr/root/etc/cont-init.d/00-aaa_dockerfile_backup.sh new file mode 100644 index 000000000..612e26d7e --- /dev/null +++ b/bazarr/root/etc/cont-init.d/00-aaa_dockerfile_backup.sh @@ -0,0 +1,29 @@ +#!/bin/bash +# If dockerfile failed install manually +if [ ! -f "/usr/bin/bashio" ]; then + echo "Bashio does not exist, executing script" + ( + ################ + # Install apps # + ################ + PACKAGES="${PACKAGES:="curl"}" + + apt-get clean \ + && apt-get update \ + && apt-get install -y --no-install-recommends ${PACKAGES} 2>/dev/null \ + || apk add --no-cache ${PACKAGES} + + ################### + # Install bashio # + ################## + + mkdir -p /tmp/bashio + curl -L -f -s "https://github.com/hassio-addons/bashio/archive/v${BASHIO_VERSION}.tar.gz" | + tar -xzf - --strip 1 -C /tmp/bashio + mv /tmp/bashio/lib /usr/lib/bashio + ln -s /usr/lib/bashio/bashio /usr/bin/bashio + rm -rf /tmp/bashio + + ) >/dev/null + +fi diff --git a/bitwarden/Dockerfile b/bitwarden/Dockerfile index c073d4219..00787c211 100644 --- a/bitwarden/Dockerfile +++ b/bitwarden/Dockerfile @@ -24,15 +24,15 @@ COPY --from=vaultwarden /web-vault /opt/web-vault # add Nginx # hadolint ignore=DL3009 +ENV PACKAGES="libmariadb-dev-compat \ + libpq5 \ + nginx \ + sqlite3" + RUN \ apt-get clean \ && apt-get update \ - \ - && apt-get install -y --no-install-recommends \ - libmariadb-dev-compat \ - libpq5 \ - nginx \ - sqlite3 \ + && apt-get install -y --no-install-recommends ${PACKAGES} \ && apt-get clean \ && rm -f -r \ /etc/nginx \ diff --git a/bitwarden/rootfs/etc/cont-init.d/00-aaa_dockerfile_backup.sh b/bitwarden/rootfs/etc/cont-init.d/00-aaa_dockerfile_backup.sh new file mode 100644 index 000000000..612e26d7e --- /dev/null +++ b/bitwarden/rootfs/etc/cont-init.d/00-aaa_dockerfile_backup.sh @@ -0,0 +1,29 @@ +#!/bin/bash +# If dockerfile failed install manually +if [ ! -f "/usr/bin/bashio" ]; then + echo "Bashio does not exist, executing script" + ( + ################ + # Install apps # + ################ + PACKAGES="${PACKAGES:="curl"}" + + apt-get clean \ + && apt-get update \ + && apt-get install -y --no-install-recommends ${PACKAGES} 2>/dev/null \ + || apk add --no-cache ${PACKAGES} + + ################### + # Install bashio # + ################## + + mkdir -p /tmp/bashio + curl -L -f -s "https://github.com/hassio-addons/bashio/archive/v${BASHIO_VERSION}.tar.gz" | + tar -xzf - --strip 1 -C /tmp/bashio + mv /tmp/bashio/lib /usr/lib/bashio + ln -s /usr/lib/bashio/bashio /usr/bin/bashio + rm -rf /tmp/bashio + + ) >/dev/null + +fi diff --git a/booksonic_air/Dockerfile b/booksonic_air/Dockerfile index 6cdb862ab..9711c5ce8 100644 --- a/booksonic_air/Dockerfile +++ b/booksonic_air/Dockerfile @@ -2,6 +2,12 @@ ARG BUILD_FROM ARG BUILD_VERSION FROM linuxserver/booksonic-air:latest ENV BASHIO_VERSION=0.14.3 +ENV PACKAGES="jq \ + curl \ + cifs-utils \ + keyutils \ + samba \ + smbclient" RUN \ ################ @@ -9,13 +15,7 @@ RUN \ ################ apt-get clean \ && apt-get update \ - && apt-get install -y \ - jq \ - curl \ - cifs-utils \ - keyutils \ - samba \ - smbclient \ + && apt-get install -y --no-install-recommends ${PACKAGES} \ \ ################### # Install bashio # diff --git a/booksonic_air/root/etc/cont-init.d/00-aaa_dockerfile_backup.sh b/booksonic_air/root/etc/cont-init.d/00-aaa_dockerfile_backup.sh index 74bb34bc9..612e26d7e 100644 --- a/booksonic_air/root/etc/cont-init.d/00-aaa_dockerfile_backup.sh +++ b/booksonic_air/root/etc/cont-init.d/00-aaa_dockerfile_backup.sh @@ -6,15 +6,12 @@ if [ ! -f "/usr/bin/bashio" ]; then ################ # Install apps # ################ - apt-get clean - apt-get update - apt-get install -y --no-install-recommends \ - jq \ - cifs-utils \ - keyutils \ - samba \ - smbclient - apt-get clean + PACKAGES="${PACKAGES:="curl"}" + + apt-get clean \ + && apt-get update \ + && apt-get install -y --no-install-recommends ${PACKAGES} 2>/dev/null \ + || apk add --no-cache ${PACKAGES} ################### # Install bashio # @@ -26,6 +23,7 @@ if [ ! -f "/usr/bin/bashio" ]; then mv /tmp/bashio/lib /usr/lib/bashio ln -s /usr/lib/bashio/bashio /usr/bin/bashio rm -rf /tmp/bashio + ) >/dev/null fi diff --git a/cloudcommander/Dockerfile b/cloudcommander/Dockerfile index 41befcde5..ce1f64c5b 100644 --- a/cloudcommander/Dockerfile +++ b/cloudcommander/Dockerfile @@ -1,6 +1,12 @@ ARG BUILD_VERSION FROM coderaiser/cloudcmd:latest ENV BASHIO_VERSION=0.14.3 +ENV PACKAGES="jq \ + cifs-utils \ + keyutils \ + samba \ + smbclient \ + nginx" RUN \ ################ @@ -8,13 +14,7 @@ RUN \ ################ apt-get clean \ && apt-get update \ - && apt-get install -y --no-install-recommends \ - jq \ - cifs-utils \ - keyutils \ - samba \ - smbclient \ - nginx \ + && apt-get install -y --no-install-recommends ${PACKAGES} \ && apt-get clean \ \ ################## diff --git a/cloudcommander/rootfs/scripts/00-aaa_dockerfile_backup.sh b/cloudcommander/rootfs/scripts/00-aaa_dockerfile_backup.sh index 08929d3e8..612e26d7e 100644 --- a/cloudcommander/rootfs/scripts/00-aaa_dockerfile_backup.sh +++ b/cloudcommander/rootfs/scripts/00-aaa_dockerfile_backup.sh @@ -6,16 +6,12 @@ if [ ! -f "/usr/bin/bashio" ]; then ################ # Install apps # ################ - apt-get clean && - apt-get update && - apt-get install -y --no-install-recommends \ - jq \ - cifs-utils \ - keyutils \ - samba \ - smbclient \ - nginx && - apt-get clean + PACKAGES="${PACKAGES:="curl"}" + + apt-get clean \ + && apt-get update \ + && apt-get install -y --no-install-recommends ${PACKAGES} 2>/dev/null \ + || apk add --no-cache ${PACKAGES} ################### # Install bashio # @@ -27,6 +23,7 @@ if [ ! -f "/usr/bin/bashio" ]; then mv /tmp/bashio/lib /usr/lib/bashio ln -s /usr/lib/bashio/bashio /usr/bin/bashio rm -rf /tmp/bashio + ) >/dev/null fi diff --git a/code-server/Dockerfile b/code-server/Dockerfile index eaecc2d7d..e688c934d 100644 --- a/code-server/Dockerfile +++ b/code-server/Dockerfile @@ -2,11 +2,11 @@ ARG BUILD_FROM ARG BUILD_VERSION FROM ${BUILD_FROM} ENV BASHIO_VERSION=0.14.3 +ENV PACKAGES="jq" # Install bashio RUN apt-get update \ - && apt-get install -y --no-install-recommends \ - jq \ + && apt-get install -y --no-install-recommends ${PACKAGES} \ ################## # Install bashio # ################## diff --git a/code-server/root/etc/cont-init.d/00-aaa_dockerfile_backup.sh b/code-server/root/etc/cont-init.d/00-aaa_dockerfile_backup.sh new file mode 100644 index 000000000..612e26d7e --- /dev/null +++ b/code-server/root/etc/cont-init.d/00-aaa_dockerfile_backup.sh @@ -0,0 +1,29 @@ +#!/bin/bash +# If dockerfile failed install manually +if [ ! -f "/usr/bin/bashio" ]; then + echo "Bashio does not exist, executing script" + ( + ################ + # Install apps # + ################ + PACKAGES="${PACKAGES:="curl"}" + + apt-get clean \ + && apt-get update \ + && apt-get install -y --no-install-recommends ${PACKAGES} 2>/dev/null \ + || apk add --no-cache ${PACKAGES} + + ################### + # Install bashio # + ################## + + mkdir -p /tmp/bashio + curl -L -f -s "https://github.com/hassio-addons/bashio/archive/v${BASHIO_VERSION}.tar.gz" | + tar -xzf - --strip 1 -C /tmp/bashio + mv /tmp/bashio/lib /usr/lib/bashio + ln -s /usr/lib/bashio/bashio /usr/bin/bashio + rm -rf /tmp/bashio + + ) >/dev/null + +fi diff --git a/doublecommander/Dockerfile b/doublecommander/Dockerfile index 3f4ec8a75..daa72a279 100644 --- a/doublecommander/Dockerfile +++ b/doublecommander/Dockerfile @@ -2,13 +2,14 @@ ARG BUILD_FROM ARG BUILD_VERSION FROM ${BUILD_FROM} ENV BASHIO_VERSION=0.14.3 +ENV PACKAGES="jq \ + samba \ + smbclient" # Install bashio RUN apt-get update \ - && apt-get install -y --no-install-recommends \ - jq \ - samba \ - smbclient \ + && apt-get install -y --no-install-recommends ${PACKAGES} \ + \ ################## # Install bashio # ################## diff --git a/doublecommander/root/etc/cont-init.d/00-aaa_dockerfile_backup.sh b/doublecommander/root/etc/cont-init.d/00-aaa_dockerfile_backup.sh new file mode 100644 index 000000000..612e26d7e --- /dev/null +++ b/doublecommander/root/etc/cont-init.d/00-aaa_dockerfile_backup.sh @@ -0,0 +1,29 @@ +#!/bin/bash +# If dockerfile failed install manually +if [ ! -f "/usr/bin/bashio" ]; then + echo "Bashio does not exist, executing script" + ( + ################ + # Install apps # + ################ + PACKAGES="${PACKAGES:="curl"}" + + apt-get clean \ + && apt-get update \ + && apt-get install -y --no-install-recommends ${PACKAGES} 2>/dev/null \ + || apk add --no-cache ${PACKAGES} + + ################### + # Install bashio # + ################## + + mkdir -p /tmp/bashio + curl -L -f -s "https://github.com/hassio-addons/bashio/archive/v${BASHIO_VERSION}.tar.gz" | + tar -xzf - --strip 1 -C /tmp/bashio + mv /tmp/bashio/lib /usr/lib/bashio + ln -s /usr/lib/bashio/bashio /usr/bin/bashio + rm -rf /tmp/bashio + + ) >/dev/null + +fi diff --git a/emby/Dockerfile b/emby/Dockerfile index eaf616694..4b66a1a68 100644 --- a/emby/Dockerfile +++ b/emby/Dockerfile @@ -2,7 +2,11 @@ ARG BUILD_FROM ARG BUILD_VERSION FROM ${BUILD_FROM} ENV BASHIO_VERSION=0.14.3 -ARG TEMPIO_VERSION=2021.01.0 +ENV PACKAGES="jq \ + cifs-utils \ + keyutils \ + samba \ + smbclient" # Set shell SHELL ["/bin/bash", "-o", "pipefail", "-c"] @@ -13,12 +17,7 @@ RUN \ ################ apt-get clean \ && apt-get update \ - && apt-get install -y --no-install-recommends \ - jq \ - cifs-utils \ - keyutils \ - samba \ - smbclient \ + && apt-get install -y --no-install-recommends ${PACKAGES} \ \ ################## # Install bashio # @@ -28,13 +27,14 @@ RUN \ | tar -xzf - --strip 1 -C /tmp/bashio \ && mv /tmp/bashio/lib /usr/lib/bashio \ && ln -s /usr/lib/bashio/bashio /usr/bin/bashio \ - && rm -rf /tmp/bashio \ - \ + && rm -rf /tmp/bashio || true + +RUN \ ############################# # Allow UID and GID setting # ############################# \ - && sed -i 's/bash/bashio/g' /etc/cont-init.d/10-adduser \ + sed -i 's/bash/bashio/g' /etc/cont-init.d/10-adduser \ && sed -i 's/{PUID:-911}/(bashio::config "PUID")/g' /etc/cont-init.d/10-adduser \ && sed -i 's/{PGID:-911}/(bashio::config "PGID")/g' /etc/cont-init.d/10-adduser \ && sed -i "s|chown abc:abc /config||g" /etc/cont-init.d/10-adduser \ diff --git a/emby/root/etc/cont-init.d/00-aaa_dockerfile_backup.sh b/emby/root/etc/cont-init.d/00-aaa_dockerfile_backup.sh new file mode 100644 index 000000000..612e26d7e --- /dev/null +++ b/emby/root/etc/cont-init.d/00-aaa_dockerfile_backup.sh @@ -0,0 +1,29 @@ +#!/bin/bash +# If dockerfile failed install manually +if [ ! -f "/usr/bin/bashio" ]; then + echo "Bashio does not exist, executing script" + ( + ################ + # Install apps # + ################ + PACKAGES="${PACKAGES:="curl"}" + + apt-get clean \ + && apt-get update \ + && apt-get install -y --no-install-recommends ${PACKAGES} 2>/dev/null \ + || apk add --no-cache ${PACKAGES} + + ################### + # Install bashio # + ################## + + mkdir -p /tmp/bashio + curl -L -f -s "https://github.com/hassio-addons/bashio/archive/v${BASHIO_VERSION}.tar.gz" | + tar -xzf - --strip 1 -C /tmp/bashio + mv /tmp/bashio/lib /usr/lib/bashio + ln -s /usr/lib/bashio/bashio /usr/bin/bashio + rm -rf /tmp/bashio + + ) >/dev/null + +fi diff --git a/enedisgateway2mqtt/Dockerfile b/enedisgateway2mqtt/Dockerfile index eb7d85dab..402e0e525 100644 --- a/enedisgateway2mqtt/Dockerfile +++ b/enedisgateway2mqtt/Dockerfile @@ -3,6 +3,9 @@ FROM m4dm4rtig4n/enedisgateway2mqtt:$BUILD_UPSTREAM # Base system ENV BASHIO_VERSION=0.14.3 +ENV PACKAGES="jq \ + curl \ + yamllin" # Copy root filesystem COPY rootfs / @@ -14,10 +17,7 @@ RUN \ ################ apt-get clean \ && apt-get update \ - && apt-get install -y \ - jq \ - curl \ - yamllint \ + && apt-get install -y --no-install-recommends ${PACKAGES} \ && apt-get clean \ \ ################## diff --git a/enedisgateway2mqtt/rootfs/scripts/00-aaa_dockerfile_backup.sh b/enedisgateway2mqtt/rootfs/scripts/00-aaa_dockerfile_backup.sh index f3ef81108..612e26d7e 100644 --- a/enedisgateway2mqtt/rootfs/scripts/00-aaa_dockerfile_backup.sh +++ b/enedisgateway2mqtt/rootfs/scripts/00-aaa_dockerfile_backup.sh @@ -3,17 +3,15 @@ if [ ! -f "/usr/bin/bashio" ]; then echo "Bashio does not exist, executing script" ( - # Remove errors on apt-get - export DEBIAN_FRONTEND=noninteractive ################ # Install apps # ################ - apt-get clean - apt-get update - apt-get install -yq --no-install-recommends \ - jq \ - curl \ - yamllint + PACKAGES="${PACKAGES:="curl"}" + + apt-get clean \ + && apt-get update \ + && apt-get install -y --no-install-recommends ${PACKAGES} 2>/dev/null \ + || apk add --no-cache ${PACKAGES} ################### # Install bashio # @@ -25,6 +23,7 @@ if [ ! -f "/usr/bin/bashio" ]; then mv /tmp/bashio/lib /usr/lib/bashio ln -s /usr/lib/bashio/bashio /usr/bin/bashio rm -rf /tmp/bashio + ) >/dev/null fi diff --git a/filebrowser/Dockerfile b/filebrowser/Dockerfile index dd05af6e9..5cc2047d4 100644 --- a/filebrowser/Dockerfile +++ b/filebrowser/Dockerfile @@ -3,7 +3,6 @@ ARG BUILD_UPSTREAM="2.19.0" FROM hurlenko/filebrowser:v${BUILD_UPSTREAM} ENV BASHIO_VERSION=0.14.3 - ENV PACKAGES="curl \ jq \ bash \ @@ -18,7 +17,7 @@ RUN \ ################ # Install apps # ################ - apk add --no-cache $PACKAGES \ + apk add --no-cache ${PACKAGES} \ \ ################## # Install bashio # diff --git a/filebrowser/rootfs/scripts/00-aaa_dockerfile_backup.sh b/filebrowser/rootfs/scripts/00-aaa_dockerfile_backup.sh index 616e24455..612e26d7e 100644 --- a/filebrowser/rootfs/scripts/00-aaa_dockerfile_backup.sh +++ b/filebrowser/rootfs/scripts/00-aaa_dockerfile_backup.sh @@ -6,7 +6,12 @@ if [ ! -f "/usr/bin/bashio" ]; then ################ # Install apps # ################ - apk add --no-cache $PACKAGES + PACKAGES="${PACKAGES:="curl"}" + + apt-get clean \ + && apt-get update \ + && apt-get install -y --no-install-recommends ${PACKAGES} 2>/dev/null \ + || apk add --no-cache ${PACKAGES} ################### # Install bashio # diff --git a/freqtrade/Dockerfile b/freqtrade/Dockerfile index 3f0b418ac..e34085015 100644 --- a/freqtrade/Dockerfile +++ b/freqtrade/Dockerfile @@ -2,6 +2,7 @@ ARG BUILD_FROM ARG BUILD_VERSION FROM freqtradeorg/freqtrade:latest ENV BASHIO_VERSION=0.14.3 +ENV PACKAGES="jq git" USER root COPY rootfs / @@ -11,7 +12,7 @@ RUN \ # Install apps # ################ apt-get update \ - && apt-get install -y --no-install-recommends jq git \ + && apt-get install -y --no-install-recommends ${PACKAGES} \ \ ################### # Install bashio # @@ -21,7 +22,7 @@ RUN \ | tar -xzf - --strip 1 -C /tmp/bashio \ && mv /tmp/bashio/lib /usr/lib/bashio \ && ln -s /usr/lib/bashio/bashio /usr/bin/bashio \ - && rm -rf /tmp/bashio + && rm -rf /tmp/bashio || true VOLUME [ "/data" ] WORKDIR / diff --git a/freqtrade/rootfs/etc/cont-init.d/00-aaa_dockerfile_backup.sh b/freqtrade/rootfs/etc/cont-init.d/00-aaa_dockerfile_backup.sh new file mode 100644 index 000000000..612e26d7e --- /dev/null +++ b/freqtrade/rootfs/etc/cont-init.d/00-aaa_dockerfile_backup.sh @@ -0,0 +1,29 @@ +#!/bin/bash +# If dockerfile failed install manually +if [ ! -f "/usr/bin/bashio" ]; then + echo "Bashio does not exist, executing script" + ( + ################ + # Install apps # + ################ + PACKAGES="${PACKAGES:="curl"}" + + apt-get clean \ + && apt-get update \ + && apt-get install -y --no-install-recommends ${PACKAGES} 2>/dev/null \ + || apk add --no-cache ${PACKAGES} + + ################### + # Install bashio # + ################## + + mkdir -p /tmp/bashio + curl -L -f -s "https://github.com/hassio-addons/bashio/archive/v${BASHIO_VERSION}.tar.gz" | + tar -xzf - --strip 1 -C /tmp/bashio + mv /tmp/bashio/lib /usr/lib/bashio + ln -s /usr/lib/bashio/bashio /usr/bin/bashio + rm -rf /tmp/bashio + + ) >/dev/null + +fi diff --git a/gazpar2mqtt/Dockerfile b/gazpar2mqtt/Dockerfile index bfaf4f71e..e753dcc94 100644 --- a/gazpar2mqtt/Dockerfile +++ b/gazpar2mqtt/Dockerfile @@ -3,6 +3,9 @@ FROM yukulehe/gazpar2mqtt:latest # Base system ENV BASHIO_VERSION=0.14.3 ENV TZ=Europe/Paris +ENV PACKAGES="jq \ + curl \ + yamllint" # Copy root filesystem COPY rootfs / @@ -13,10 +16,7 @@ RUN \ ################ apt-get clean \ && apt-get update \ - && apt-get install -y \ - jq \ - curl \ - yamllint \ + && apt-get install -y --no-install-recommends ${PACKAGES} \ && apt-get clean \ \ ################## diff --git a/gazpar2mqtt/rootfs/scripts/00-aaa_dockerfile_backup.sh b/gazpar2mqtt/rootfs/scripts/00-aaa_dockerfile_backup.sh index fb813628d..612e26d7e 100644 --- a/gazpar2mqtt/rootfs/scripts/00-aaa_dockerfile_backup.sh +++ b/gazpar2mqtt/rootfs/scripts/00-aaa_dockerfile_backup.sh @@ -6,12 +6,12 @@ if [ ! -f "/usr/bin/bashio" ]; then ################ # Install apps # ################ - apt-get clean && - apt-get update && - apt-get install -y \ - jq \ - curl \ - yamllint + PACKAGES="${PACKAGES:="curl"}" + + apt-get clean \ + && apt-get update \ + && apt-get install -y --no-install-recommends ${PACKAGES} 2>/dev/null \ + || apk add --no-cache ${PACKAGES} ################### # Install bashio # @@ -23,6 +23,7 @@ if [ ! -f "/usr/bin/bashio" ]; then mv /tmp/bashio/lib /usr/lib/bashio ln -s /usr/lib/bashio/bashio /usr/bin/bashio rm -rf /tmp/bashio + ) >/dev/null fi diff --git a/grav/Dockerfile b/grav/Dockerfile index b3a528014..0c9794c1b 100644 --- a/grav/Dockerfile +++ b/grav/Dockerfile @@ -2,26 +2,18 @@ ARG BUILD_FROM ARG BUILD_VERSION FROM ${BUILD_FROM} ENV BASHIO_VERSION=0.14.3 +ENV PACKAGES="jq \ + curl \ + cifs-utils \ + keyutils \ + samba \ + samba-client" RUN \ ################ # Install apps # ################ - apt-get clean \ - && apt-get update \ - && apt-get install -y \ - jq \ - curl \ - cifs-utils \ - keyutils \ - samba \ - smbclient || apk add --no-cache \ - jq \ - curl \ - cifs-utils \ - keyutils \ - samba \ - samba-client \ + apk add --no-cache ${PACKAGES} \ \ ################### # Install bashio # diff --git a/grav/root/etc/cont-init.d/00-aaa_dockerfile_backup.sh b/grav/root/etc/cont-init.d/00-aaa_dockerfile_backup.sh new file mode 100644 index 000000000..612e26d7e --- /dev/null +++ b/grav/root/etc/cont-init.d/00-aaa_dockerfile_backup.sh @@ -0,0 +1,29 @@ +#!/bin/bash +# If dockerfile failed install manually +if [ ! -f "/usr/bin/bashio" ]; then + echo "Bashio does not exist, executing script" + ( + ################ + # Install apps # + ################ + PACKAGES="${PACKAGES:="curl"}" + + apt-get clean \ + && apt-get update \ + && apt-get install -y --no-install-recommends ${PACKAGES} 2>/dev/null \ + || apk add --no-cache ${PACKAGES} + + ################### + # Install bashio # + ################## + + mkdir -p /tmp/bashio + curl -L -f -s "https://github.com/hassio-addons/bashio/archive/v${BASHIO_VERSION}.tar.gz" | + tar -xzf - --strip 1 -C /tmp/bashio + mv /tmp/bashio/lib /usr/lib/bashio + ln -s /usr/lib/bashio/bashio /usr/bin/bashio + rm -rf /tmp/bashio + + ) >/dev/null + +fi diff --git a/jackett/Dockerfile b/jackett/Dockerfile index a72a10d7a..c0ae0d69d 100644 --- a/jackett/Dockerfile +++ b/jackett/Dockerfile @@ -2,12 +2,18 @@ ARG BUILD_FROM ARG BUILD_VERSION FROM ${BUILD_FROM} ENV BASHIO_VERSION=0.14.3 +ENV PACKAGES="curl" RUN \ + ################ + # Install apps # + ################ + apk add --no-cache ${PACKAGES} \ + \ ################## # Install bashio # ################## - curl -J -L -o /tmp/bashio.tar.gz \ + && curl -J -L -o /tmp/bashio.tar.gz \ "https://github.com/hassio-addons/bashio/archive/v${BASHIO_VERSION}.tar.gz" \ && mkdir /tmp/bashio \ && tar zxvf \ @@ -16,7 +22,7 @@ RUN \ \ && mv /tmp/bashio/lib /usr/lib/bashio \ && ln -s /usr/lib/bashio/bashio /usr/bin/bashio \ - && rm -fr /tmp/bashio.tar.gz + && rm -fr /tmp/bashio.tar.gz || true # use /data instead of /config for hass.io environment RUN sed -i "s|/config|/config/jackett|g" /etc/services.d/jackett/run \ diff --git a/jackett/root/etc/cont-init.d/00-aaa_dockerfile_backup.sh b/jackett/root/etc/cont-init.d/00-aaa_dockerfile_backup.sh new file mode 100644 index 000000000..612e26d7e --- /dev/null +++ b/jackett/root/etc/cont-init.d/00-aaa_dockerfile_backup.sh @@ -0,0 +1,29 @@ +#!/bin/bash +# If dockerfile failed install manually +if [ ! -f "/usr/bin/bashio" ]; then + echo "Bashio does not exist, executing script" + ( + ################ + # Install apps # + ################ + PACKAGES="${PACKAGES:="curl"}" + + apt-get clean \ + && apt-get update \ + && apt-get install -y --no-install-recommends ${PACKAGES} 2>/dev/null \ + || apk add --no-cache ${PACKAGES} + + ################### + # Install bashio # + ################## + + mkdir -p /tmp/bashio + curl -L -f -s "https://github.com/hassio-addons/bashio/archive/v${BASHIO_VERSION}.tar.gz" | + tar -xzf - --strip 1 -C /tmp/bashio + mv /tmp/bashio/lib /usr/lib/bashio + ln -s /usr/lib/bashio/bashio /usr/bin/bashio + rm -rf /tmp/bashio + + ) >/dev/null + +fi diff --git a/jellyfin/Dockerfile b/jellyfin/Dockerfile index 0e1d82eab..7da6d7bb5 100644 --- a/jellyfin/Dockerfile +++ b/jellyfin/Dockerfile @@ -5,15 +5,13 @@ FROM ${BUILD_FROM} # Set shell SHELL ["/bin/bash", "-o", "pipefail", "-c"] ENV BASHIO_VERSION=0.14.3 +ENV PACKAGES="jq \ + samba \ + cifs-utils \ + smbclient" RUN apt-get update \ - \ - && apt-get install -y --no-install-recommends \ - jq \ - samba \ - smbclient \ - \ - && apt-get -y upgrade cifs-utils \ + && apt-get install -y --no-install-recommends ${PACKAGES} \ \ ################## # Install bashio # diff --git a/jellyfin/root/etc/cont-init.d/00-aaa_dockerfile_backup.sh b/jellyfin/root/etc/cont-init.d/00-aaa_dockerfile_backup.sh new file mode 100644 index 000000000..612e26d7e --- /dev/null +++ b/jellyfin/root/etc/cont-init.d/00-aaa_dockerfile_backup.sh @@ -0,0 +1,29 @@ +#!/bin/bash +# If dockerfile failed install manually +if [ ! -f "/usr/bin/bashio" ]; then + echo "Bashio does not exist, executing script" + ( + ################ + # Install apps # + ################ + PACKAGES="${PACKAGES:="curl"}" + + apt-get clean \ + && apt-get update \ + && apt-get install -y --no-install-recommends ${PACKAGES} 2>/dev/null \ + || apk add --no-cache ${PACKAGES} + + ################### + # Install bashio # + ################## + + mkdir -p /tmp/bashio + curl -L -f -s "https://github.com/hassio-addons/bashio/archive/v${BASHIO_VERSION}.tar.gz" | + tar -xzf - --strip 1 -C /tmp/bashio + mv /tmp/bashio/lib /usr/lib/bashio + ln -s /usr/lib/bashio/bashio /usr/bin/bashio + rm -rf /tmp/bashio + + ) >/dev/null + +fi diff --git a/joplin/Dockerfile b/joplin/Dockerfile index 776fbcd78..f283dba1b 100644 --- a/joplin/Dockerfile +++ b/joplin/Dockerfile @@ -3,6 +3,8 @@ ARG BUILD_VERSION FROM florider89/joplin-server:master ENV BASHIO_VERSION=0.14.3 +ENV PACKAGES="jq \ + curl" USER root RUN \ ################ @@ -10,10 +12,7 @@ RUN \ ################ apt-get clean \ && apt-get update \ - && apt-get install -y \ - jq \ - curl \ - # nginx \ + && apt-get install -y --no-install-recommends ${PACKAGES} \ \ ################## # Install bashio # diff --git a/lidarr/Dockerfile b/lidarr/Dockerfile index 88a6049ed..93500f1fc 100644 --- a/lidarr/Dockerfile +++ b/lidarr/Dockerfile @@ -2,6 +2,12 @@ ARG BUILD_FROM ARG BUILD_VERSION FROM ${BUILD_FROM} ENV BASHIO_VERSION=0.14.3 +ENV PACKAGES="jq \ + curl \ + cifs-utils \ + keyutils \ + samba \ + smbclient" RUN \ ################ @@ -9,13 +15,7 @@ RUN \ ################ apt-get clean \ && apt-get update \ - && apt-get install -y \ - jq \ - curl \ - cifs-utils \ - keyutils \ - samba \ - smbclient \ + && apt-get install -y --no-install-recommends ${PACKAGES} \ \ ################### # Install bashio # diff --git a/lidarr/root/etc/cont-init.d/00-aaa_dockerfile_backup.sh b/lidarr/root/etc/cont-init.d/00-aaa_dockerfile_backup.sh new file mode 100644 index 000000000..612e26d7e --- /dev/null +++ b/lidarr/root/etc/cont-init.d/00-aaa_dockerfile_backup.sh @@ -0,0 +1,29 @@ +#!/bin/bash +# If dockerfile failed install manually +if [ ! -f "/usr/bin/bashio" ]; then + echo "Bashio does not exist, executing script" + ( + ################ + # Install apps # + ################ + PACKAGES="${PACKAGES:="curl"}" + + apt-get clean \ + && apt-get update \ + && apt-get install -y --no-install-recommends ${PACKAGES} 2>/dev/null \ + || apk add --no-cache ${PACKAGES} + + ################### + # Install bashio # + ################## + + mkdir -p /tmp/bashio + curl -L -f -s "https://github.com/hassio-addons/bashio/archive/v${BASHIO_VERSION}.tar.gz" | + tar -xzf - --strip 1 -C /tmp/bashio + mv /tmp/bashio/lib /usr/lib/bashio + ln -s /usr/lib/bashio/bashio /usr/bin/bashio + rm -rf /tmp/bashio + + ) >/dev/null + +fi diff --git a/mealie/Dockerfile b/mealie/Dockerfile index 298fe4066..e6299c639 100644 --- a/mealie/Dockerfile +++ b/mealie/Dockerfile @@ -5,12 +5,13 @@ FROM ${BUILD_FROM} COPY rootfs / ENV BASHIO_VERSION=0.14.3 +ENV PACKAGES="jq curl bash" RUN \ ################ # Install apps # ################ - apt-get update && apt-get install -y jq curl bash && apt-get clean || apk add --no-cache jq curl bash \ + apt-get update && apt-get install -y --no-install-recommends ${PACKAGES} && apt-get clean || apk add --no-cache ${PACKAGES} \ \ ################## # Install bashio # diff --git a/nextcloud/Dockerfile b/nextcloud/Dockerfile index 54fa8ec7c..1282bf50c 100644 --- a/nextcloud/Dockerfile +++ b/nextcloud/Dockerfile @@ -7,16 +7,16 @@ FROM ${BUILD_FROM} ENV NEXTCLOUD_PATH="/data/config/www/nextcloud" ARG BUILD_ARCH ENV BASHIO_VERSION=0.14.3 +ENV PACKAGES="curl jq wget gcompat@community" # Add bashio RUN \ echo "Install version $BUILD_VERSION on $BUILD_ARCH" \ + && apk add --no-cache ${PACKAGES} \ ################## # Install bashio # ################## && echo "**** Install Bashio ****" \ - && apk add --no-cache \ - curl jq wget \ && curl -J -L -o /tmp/bashio.tar.gz \ "https://github.com/hassio-addons/bashio/archive/v${BASHIO_VERSION}.tar.gz" \ && mkdir /tmp/bashio \ @@ -26,10 +26,7 @@ RUN \ \ && mv /tmp/bashio/lib /usr/lib/bashio \ && ln -s /usr/lib/bashio/bashio /usr/bin/bashio \ - && rm -fr /tmp/bashio.tar.gz \ - \ - #gclib compatibility - && apk add --no-cache gcompat@community || true + && rm -fr /tmp/bashio.tar.gz || true RUN \ # modify/copy files diff --git a/nextcloud/root/etc/cont-init.d/00-aaa_dockerfile_backup.sh b/nextcloud/root/etc/cont-init.d/00-aaa_dockerfile_backup.sh index 54b16e6ab..612e26d7e 100644 --- a/nextcloud/root/etc/cont-init.d/00-aaa_dockerfile_backup.sh +++ b/nextcloud/root/etc/cont-init.d/00-aaa_dockerfile_backup.sh @@ -6,25 +6,12 @@ if [ ! -f "/usr/bin/bashio" ]; then ################ # Install apps # ################ - apk update && - apk add --no-cache \ - jq \ - curl \ - cifs-utils \ - keyutils \ - samba-client \ - samba || - ( - apt-get clean && - apt-get update && - apt-get install -y --no-install-recommends \ - jq \ - curl \ - cifs-utils \ - keyutils \ - smbclient \ - samba - ) + PACKAGES="${PACKAGES:="curl"}" + + apt-get clean \ + && apt-get update \ + && apt-get install -y --no-install-recommends ${PACKAGES} 2>/dev/null \ + || apk add --no-cache ${PACKAGES} ################### # Install bashio # @@ -36,6 +23,7 @@ if [ ! -f "/usr/bin/bashio" ]; then mv /tmp/bashio/lib /usr/lib/bashio ln -s /usr/lib/bashio/bashio /usr/bin/bashio rm -rf /tmp/bashio + ) >/dev/null fi diff --git a/organizr/Dockerfile b/organizr/Dockerfile index b4485acd7..e6357f4aa 100644 --- a/organizr/Dockerfile +++ b/organizr/Dockerfile @@ -2,14 +2,14 @@ ARG BUILD_FROM ARG BUILD_VERSION FROM ${BUILD_FROM} ENV BASHIO_VERSION=0.14.3 +ENV PACKAGES="curl \ + jq" RUN \ ################ # Install apps # ################ - apk add --no-cache \ - curl \ - jq \ + apk add --no-cache ${PACKAGES} \ \ ################### # Install bashio # @@ -19,14 +19,14 @@ RUN \ | tar -xzf - --strip 1 -C /tmp/bashio \ && mv /tmp/bashio/lib /usr/lib/bashio \ && ln -s /usr/lib/bashio/bashio /usr/bin/bashio \ - && rm -rf /tmp/bashio \ - \ + && rm -rf /tmp/bashio || true + +RUN \ ######################################## # Correct upstream image folders links # ######################################## - \ # Allow UID and GID setting - && sed -i 's/bash/bashio/g' /etc/cont-init.d/10-adduser \ + sed -i 's/bash/bashio/g' /etc/cont-init.d/10-adduser \ && sed -i 's/{PUID:-911}/(bashio::config "PUID")/g' /etc/cont-init.d/10-adduser \ && sed -i 's/{PGID:-911}/(bashio::config "PGID")/g' /etc/cont-init.d/10-adduser \ \ diff --git a/organizr/root/etc/cont-init.d/00-aaa_dockerfile_backup.sh b/organizr/root/etc/cont-init.d/00-aaa_dockerfile_backup.sh new file mode 100644 index 000000000..612e26d7e --- /dev/null +++ b/organizr/root/etc/cont-init.d/00-aaa_dockerfile_backup.sh @@ -0,0 +1,29 @@ +#!/bin/bash +# If dockerfile failed install manually +if [ ! -f "/usr/bin/bashio" ]; then + echo "Bashio does not exist, executing script" + ( + ################ + # Install apps # + ################ + PACKAGES="${PACKAGES:="curl"}" + + apt-get clean \ + && apt-get update \ + && apt-get install -y --no-install-recommends ${PACKAGES} 2>/dev/null \ + || apk add --no-cache ${PACKAGES} + + ################### + # Install bashio # + ################## + + mkdir -p /tmp/bashio + curl -L -f -s "https://github.com/hassio-addons/bashio/archive/v${BASHIO_VERSION}.tar.gz" | + tar -xzf - --strip 1 -C /tmp/bashio + mv /tmp/bashio/lib /usr/lib/bashio + ln -s /usr/lib/bashio/bashio /usr/bin/bashio + rm -rf /tmp/bashio + + ) >/dev/null + +fi diff --git a/paperless_ng/Dockerfile b/paperless_ng/Dockerfile index 55558c4fe..677a1693b 100644 --- a/paperless_ng/Dockerfile +++ b/paperless_ng/Dockerfile @@ -5,19 +5,17 @@ FROM ${BUILD_FROM} # Set shell ENV BASHIO_VERSION=0.14.3 ENV PAPERLESS_DATA_DIR=/config/paperless_ng - -RUN apt-get update && \ - \ - apt-get clean && \ - apt-get update && \ - apt-get install -y --no-install-recommends \ - jq \ +ENV PACKAGES="jq \ curl \ cifs-utils \ keyutils \ smbclient \ samba \ - yamllint \ + yamllint" + +RUN apt-get clean && \ + apt-get update && \ + apt-get install -y --no-install-recommends ${PACKAGES} \ \ ################## # Install bashio # @@ -27,7 +25,7 @@ RUN apt-get update && \ | tar -xzf - --strip 1 -C /tmp/bashio \ && mv /tmp/bashio/lib /usr/lib/bashio \ && ln -s /usr/lib/bashio/bashio /usr/bin/bashio \ - && rm -rf /tmp/bashio + && rm -rf /tmp/bashio || true # copy local files COPY rootfs/ / diff --git a/paperless_ng/rootfs/etc/cont-init.d/00-aaa_dockerfile_backup.sh b/paperless_ng/rootfs/etc/cont-init.d/00-aaa_dockerfile_backup.sh index 5277756b3..612e26d7e 100644 --- a/paperless_ng/rootfs/etc/cont-init.d/00-aaa_dockerfile_backup.sh +++ b/paperless_ng/rootfs/etc/cont-init.d/00-aaa_dockerfile_backup.sh @@ -6,17 +6,12 @@ if [ ! -f "/usr/bin/bashio" ]; then ################ # Install apps # ################ - - apt-get clean && - apt-get update && - apt-get install -y --no-install-recommends \ - jq \ - curl \ - cifs-utils \ - keyutils \ - smbclient \ - samba \ - yamllint + PACKAGES="${PACKAGES:="curl"}" + + apt-get clean \ + && apt-get update \ + && apt-get install -y --no-install-recommends ${PACKAGES} 2>/dev/null \ + || apk add --no-cache ${PACKAGES} ################### # Install bashio # @@ -28,6 +23,7 @@ if [ ! -f "/usr/bin/bashio" ]; then mv /tmp/bashio/lib /usr/lib/bashio ln -s /usr/lib/bashio/bashio /usr/bin/bashio rm -rf /tmp/bashio + ) >/dev/null fi diff --git a/papermerge/Dockerfile b/papermerge/Dockerfile index 076c8b6de..dff969a6c 100644 --- a/papermerge/Dockerfile +++ b/papermerge/Dockerfile @@ -4,20 +4,21 @@ ARG BUILD_VERSION FROM ${BUILD_FROM} # Add bashio -ENV BASHIO_VERSION=0.14.3 +ENV BASHIO_VERSION=0.14.3 +ENV PACKAGES="jq \ + curl \ + cifs-utils \ + keyutils \ + samba \ + smbclient" + RUN \ ################ # Install apps # ################ apt-get clean \ && apt-get update \ - && apt-get install -y --no-install-recommends \ - jq \ - curl \ - cifs-utils \ - keyutils \ - samba \ - smbclient \ + && apt-get install -y --no-install-recommends ${PACKAGES} \ \ ################## # Install bashio # diff --git a/papermerge/rootfs/etc/cont-init.d/00-aaa_dockerfile_backup.sh b/papermerge/rootfs/etc/cont-init.d/00-aaa_dockerfile_backup.sh index 965b64433..612e26d7e 100644 --- a/papermerge/rootfs/etc/cont-init.d/00-aaa_dockerfile_backup.sh +++ b/papermerge/rootfs/etc/cont-init.d/00-aaa_dockerfile_backup.sh @@ -6,23 +6,12 @@ if [ ! -f "/usr/bin/bashio" ]; then ################ # Install apps # ################ - apt-get clean && - apt-get update && - apt-get install -y --no-install-recommends \ - jq \ - curl \ - cifs-utils \ - keyutils \ - smbclient \ - samba || - apk update && - apk add --no-cache \ - jq \ - curl \ - cifs-utils \ - keyutils \ - samba-client \ - samba + PACKAGES="${PACKAGES:="curl"}" + + apt-get clean \ + && apt-get update \ + && apt-get install -y --no-install-recommends ${PACKAGES} 2>/dev/null \ + || apk add --no-cache ${PACKAGES} ################### # Install bashio # @@ -34,6 +23,7 @@ if [ ! -f "/usr/bin/bashio" ]; then mv /tmp/bashio/lib /usr/lib/bashio ln -s /usr/lib/bashio/bashio /usr/bin/bashio rm -rf /tmp/bashio + ) >/dev/null fi diff --git a/photoprism/Dockerfile b/photoprism/Dockerfile index 804ab2989..4f1bbebc2 100644 --- a/photoprism/Dockerfile +++ b/photoprism/Dockerfile @@ -7,6 +7,13 @@ FROM photoprism/photoprism:preview COPY rootfs / ENV BASHIO_VERSION=0.14.3 +ENV PACKAGES="jq \ + curl \ + cifs-utils \ + keyutils \ + samba \ + smbclient \ + coreutils" RUN \ ################ @@ -14,14 +21,7 @@ RUN \ ################ apt-get clean \ && apt-get update \ - && apt-get install -y \ - jq \ - curl \ - cifs-utils \ - keyutils \ - samba \ - smbclient \ - coreutils \ + && apt-get install -y --no-install-recommends ${PACKAGES} \ \ ################## # Install bashio # @@ -31,14 +31,15 @@ RUN \ | tar -xzf - --strip 1 -C /tmp/bashio \ && mv /tmp/bashio/lib /usr/lib/bashio \ && ln -s /usr/lib/bashio/bashio /usr/bin/bashio \ - && rm -rf /tmp/bashio \ - \ + && rm -rf /tmp/bashio || true + +RUN \ ################### # Configure image # ################### \ # Create directories - && mkdir -m 777 -p \ + mkdir -m 777 -p \ /data/photoprism/originals \ /data/photoprism/import \ /data/photoprism/storage/config \ diff --git a/photoprism/rootfs/00-aaa_dockerfile_backup.sh b/photoprism/rootfs/00-aaa_dockerfile_backup.sh new file mode 100644 index 000000000..612e26d7e --- /dev/null +++ b/photoprism/rootfs/00-aaa_dockerfile_backup.sh @@ -0,0 +1,29 @@ +#!/bin/bash +# If dockerfile failed install manually +if [ ! -f "/usr/bin/bashio" ]; then + echo "Bashio does not exist, executing script" + ( + ################ + # Install apps # + ################ + PACKAGES="${PACKAGES:="curl"}" + + apt-get clean \ + && apt-get update \ + && apt-get install -y --no-install-recommends ${PACKAGES} 2>/dev/null \ + || apk add --no-cache ${PACKAGES} + + ################### + # Install bashio # + ################## + + mkdir -p /tmp/bashio + curl -L -f -s "https://github.com/hassio-addons/bashio/archive/v${BASHIO_VERSION}.tar.gz" | + tar -xzf - --strip 1 -C /tmp/bashio + mv /tmp/bashio/lib /usr/lib/bashio + ln -s /usr/lib/bashio/bashio /usr/bin/bashio + rm -rf /tmp/bashio + + ) >/dev/null + +fi diff --git a/piwigo/Dockerfile b/piwigo/Dockerfile index 8641f209c..f2e9ec040 100644 --- a/piwigo/Dockerfile +++ b/piwigo/Dockerfile @@ -2,6 +2,9 @@ ARG BUILD_FROM ARG BUILD_VERSION FROM ${BUILD_FROM} ENV BASHIO_VERSION=0.14.3 +ENV PACKAGES="jq \ + curl \ + cifs-utils" # Copy root filesystem COPY rootfs / @@ -10,10 +13,7 @@ VOLUME [ "/data" ] RUN \ # Install bashio - apk add --no-cache \ - jq \ - curl \ - cifs-utils \ + apk add --no-cache ${PACKAGES} \ \ && curl -J -L -o /tmp/bashio.tar.gz \ "https://github.com/hassio-addons/bashio/archive/v${BASHIO_VERSION}.tar.gz" \ @@ -25,8 +25,9 @@ RUN \ && mv /tmp/bashio/lib /usr/lib/bashio \ && ln -s /usr/lib/bashio/bashio /usr/bin/bashio \ && rm -fr \ - /tmp/* \ - \ + /tmp/* || true + +RUN \ # Allow UID and GID setting && sed -i 's/bash/bashio/g' /etc/cont-init.d/10-adduser \ && sed -i 's/{PUID:-911}/(bashio::config "PUID")/g' /etc/cont-init.d/10-adduser \ diff --git a/piwigo/rootfs/etc/cont-init.d/00-aaa_dockerfile_backup.sh b/piwigo/rootfs/etc/cont-init.d/00-aaa_dockerfile_backup.sh new file mode 100644 index 000000000..612e26d7e --- /dev/null +++ b/piwigo/rootfs/etc/cont-init.d/00-aaa_dockerfile_backup.sh @@ -0,0 +1,29 @@ +#!/bin/bash +# If dockerfile failed install manually +if [ ! -f "/usr/bin/bashio" ]; then + echo "Bashio does not exist, executing script" + ( + ################ + # Install apps # + ################ + PACKAGES="${PACKAGES:="curl"}" + + apt-get clean \ + && apt-get update \ + && apt-get install -y --no-install-recommends ${PACKAGES} 2>/dev/null \ + || apk add --no-cache ${PACKAGES} + + ################### + # Install bashio # + ################## + + mkdir -p /tmp/bashio + curl -L -f -s "https://github.com/hassio-addons/bashio/archive/v${BASHIO_VERSION}.tar.gz" | + tar -xzf - --strip 1 -C /tmp/bashio + mv /tmp/bashio/lib /usr/lib/bashio + ln -s /usr/lib/bashio/bashio /usr/bin/bashio + rm -rf /tmp/bashio + + ) >/dev/null + +fi diff --git a/plex/Dockerfile b/plex/Dockerfile index a7a3f7a61..3d1a78b03 100644 --- a/plex/Dockerfile +++ b/plex/Dockerfile @@ -9,18 +9,19 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"] COPY root/ / ENV BASHIO_VERSION=0.14.3 +ENV PACKAGES="jq \ + cifs-utils \ + keyutils \ + samba \ + smbclient" + RUN \ ################ # Install apps # ################ apt-get clean \ && apt-get update \ - && apt-get install -y --no-install-recommends \ - jq \ - cifs-utils \ - keyutils \ - samba \ - smbclient \ + && apt-get install -y --no-install-recommends ${PACKAGES} \ \ ################## # Install bashio # @@ -30,13 +31,14 @@ RUN \ | tar -xzf - --strip 1 -C /tmp/bashio \ && mv /tmp/bashio/lib /usr/lib/bashio \ && ln -s /usr/lib/bashio/bashio /usr/bin/bashio \ - && rm -rf /tmp/bashio \ - \ + && rm -rf /tmp/bashio || true + +RUN \ ############################# # Allow UID and GID setting # ############################# \ - && sed -i 's/bash/bashio/g' /etc/cont-init.d/10-adduser \ + sed -i 's/bash/bashio/g' /etc/cont-init.d/10-adduser \ && sed -i 's/{PUID:-911}/(bashio::config "PUID")/g' /etc/cont-init.d/10-adduser \ && sed -i 's/{PGID:-911}/(bashio::config "PGID")/g' /etc/cont-init.d/10-adduser \ && sed -i "s|chown abc:abc /config||g" /etc/cont-init.d/10-adduser \ diff --git a/plex/root/etc/cont-init.d/00-aaa_dockerfile_backup.sh b/plex/root/etc/cont-init.d/00-aaa_dockerfile_backup.sh new file mode 100644 index 000000000..612e26d7e --- /dev/null +++ b/plex/root/etc/cont-init.d/00-aaa_dockerfile_backup.sh @@ -0,0 +1,29 @@ +#!/bin/bash +# If dockerfile failed install manually +if [ ! -f "/usr/bin/bashio" ]; then + echo "Bashio does not exist, executing script" + ( + ################ + # Install apps # + ################ + PACKAGES="${PACKAGES:="curl"}" + + apt-get clean \ + && apt-get update \ + && apt-get install -y --no-install-recommends ${PACKAGES} 2>/dev/null \ + || apk add --no-cache ${PACKAGES} + + ################### + # Install bashio # + ################## + + mkdir -p /tmp/bashio + curl -L -f -s "https://github.com/hassio-addons/bashio/archive/v${BASHIO_VERSION}.tar.gz" | + tar -xzf - --strip 1 -C /tmp/bashio + mv /tmp/bashio/lib /usr/lib/bashio + ln -s /usr/lib/bashio/bashio /usr/bin/bashio + rm -rf /tmp/bashio + + ) >/dev/null + +fi diff --git a/portainer/Dockerfile b/portainer/Dockerfile index 6b648c2fb..1cb625f5c 100644 --- a/portainer/Dockerfile +++ b/portainer/Dockerfile @@ -8,6 +8,8 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"] # Setup base ARG BUILD_ARCH=amd64 ARG BUILD_UPSTREAM="2.9.3" +ENV PACKAGES="nginx" + RUN \ if [ "${BUILD_ARCH}" = "aarch64" ]; then ARCH="arm64"; fi \ && if [ "${BUILD_ARCH}" = "armhf" ]; then ARCH="arm"; fi \ @@ -19,8 +21,7 @@ RUN \ | tar zxvf - -C /opt/ RUN \ - apk add --no-cache \ - nginx || true + apk add --no-cache ${PACKAGES} || true # Copy root filesystem COPY rootfs / diff --git a/portainer/rootfs/etc/cont-init.d/00-aaa_dockerfile_backup.sh b/portainer/rootfs/etc/cont-init.d/00-aaa_dockerfile_backup.sh index ad90ff527..612e26d7e 100644 --- a/portainer/rootfs/etc/cont-init.d/00-aaa_dockerfile_backup.sh +++ b/portainer/rootfs/etc/cont-init.d/00-aaa_dockerfile_backup.sh @@ -1,3 +1,29 @@ #!/bin/bash # If dockerfile failed install manually -nginx -v &>/dev/null || apk add --no-cache nginx +if [ ! -f "/usr/bin/bashio" ]; then + echo "Bashio does not exist, executing script" + ( + ################ + # Install apps # + ################ + PACKAGES="${PACKAGES:="curl"}" + + apt-get clean \ + && apt-get update \ + && apt-get install -y --no-install-recommends ${PACKAGES} 2>/dev/null \ + || apk add --no-cache ${PACKAGES} + + ################### + # Install bashio # + ################## + + mkdir -p /tmp/bashio + curl -L -f -s "https://github.com/hassio-addons/bashio/archive/v${BASHIO_VERSION}.tar.gz" | + tar -xzf - --strip 1 -C /tmp/bashio + mv /tmp/bashio/lib /usr/lib/bashio + ln -s /usr/lib/bashio/bashio /usr/bin/bashio + rm -rf /tmp/bashio + + ) >/dev/null + +fi diff --git a/prowlarr/Dockerfile b/prowlarr/Dockerfile index 5e67087d8..59efa0590 100644 --- a/prowlarr/Dockerfile +++ b/prowlarr/Dockerfile @@ -2,6 +2,12 @@ ARG BUILD_FROM ARG BUILD_VERSION FROM ${BUILD_FROM} ENV BASHIO_VERSION=0.14.3 +ENV PACKAGES="jq \ + curl \ + cifs-utils \ + keyutils \ + samba \ + smbclient" RUN \ ################ @@ -9,13 +15,7 @@ RUN \ ################ apt-get clean \ && apt-get update \ - && apt-get install -y \ - jq \ - curl \ - cifs-utils \ - keyutils \ - samba \ - smbclient \ + && apt-get install -y --no-install-recommends ${PACKAGES} \ \ ################### # Install bashio # diff --git a/prowlarr/root/etc/cont-init.d/00-aaa_dockerfile_backup.sh b/prowlarr/root/etc/cont-init.d/00-aaa_dockerfile_backup.sh new file mode 100644 index 000000000..612e26d7e --- /dev/null +++ b/prowlarr/root/etc/cont-init.d/00-aaa_dockerfile_backup.sh @@ -0,0 +1,29 @@ +#!/bin/bash +# If dockerfile failed install manually +if [ ! -f "/usr/bin/bashio" ]; then + echo "Bashio does not exist, executing script" + ( + ################ + # Install apps # + ################ + PACKAGES="${PACKAGES:="curl"}" + + apt-get clean \ + && apt-get update \ + && apt-get install -y --no-install-recommends ${PACKAGES} 2>/dev/null \ + || apk add --no-cache ${PACKAGES} + + ################### + # Install bashio # + ################## + + mkdir -p /tmp/bashio + curl -L -f -s "https://github.com/hassio-addons/bashio/archive/v${BASHIO_VERSION}.tar.gz" | + tar -xzf - --strip 1 -C /tmp/bashio + mv /tmp/bashio/lib /usr/lib/bashio + ln -s /usr/lib/bashio/bashio /usr/bin/bashio + rm -rf /tmp/bashio + + ) >/dev/null + +fi diff --git a/qbittorrent/Dockerfile b/qbittorrent/Dockerfile index 5f3289a31..ed890fa1c 100644 --- a/qbittorrent/Dockerfile +++ b/qbittorrent/Dockerfile @@ -22,7 +22,7 @@ RUN \ ################ apt-get clean \ && apt-get update \ - && apt-get install -y ${PACKAGES} \ + && apt-get install -y --no-install-recommends ${PACKAGES} \ && apt-get clean \ \ ############## diff --git a/qbittorrent/rootfs/etc/cont-init.d/00-aaa_dockerfile_backup.sh b/qbittorrent/rootfs/etc/cont-init.d/00-aaa_dockerfile_backup.sh index 712c49e79..07afbc954 100644 --- a/qbittorrent/rootfs/etc/cont-init.d/00-aaa_dockerfile_backup.sh +++ b/qbittorrent/rootfs/etc/cont-init.d/00-aaa_dockerfile_backup.sh @@ -10,8 +10,8 @@ if [ ! -f "/usr/bin/bashio" ]; then apt-get clean \ && apt-get update \ - && apt-get install -y $PACKAGES 2>/dev/null \ - || apk add --no-cache $PACKAGES + && apt-get install -y --no-install-recommends ${PACKAGES} 2>/dev/null \ + || apk add --no-cache ${PACKAGES} ################### # Install bashio # diff --git a/radarr/Dockerfile b/radarr/Dockerfile index 16cdf2bb0..ea95c9f49 100644 --- a/radarr/Dockerfile +++ b/radarr/Dockerfile @@ -2,6 +2,12 @@ ARG BUILD_FROM ARG BUILD_VERSION FROM ${BUILD_FROM} ENV BASHIO_VERSION=0.14.3 +ENV PACKAGES="jq \ + curl \ + cifs-utils \ + keyutils \ + samba \ + smbclient" RUN \ ################ @@ -9,13 +15,7 @@ RUN \ ################ apt-get clean \ && apt-get update \ - && apt-get install -y \ - jq \ - curl \ - cifs-utils \ - keyutils \ - samba \ - smbclient \ + && apt-get install -y --no-install-recommends ${PACKAGES} \ \ ################### # Install bashio # @@ -25,10 +25,11 @@ RUN \ | tar -xzf - --strip 1 -C /tmp/bashio \ && mv /tmp/bashio/lib /usr/lib/bashio \ && ln -s /usr/lib/bashio/bashio /usr/bin/bashio \ - && rm -rf /tmp/bashio \ - \ + && rm -rf /tmp/bashio || true + +RUN \ # use /data instead of /config for hass.io environment - && sed -i "s|/config|/config/radarr|g" /etc/services.d/radarr/run \ + sed -i "s|/config|/config/radarr|g" /etc/services.d/radarr/run \ && sed -i "s|/config|/config/radarr|g" /etc/cont-init.d/30-config \ \ # Allow UID and GID setting diff --git a/radarr/root/etc/cont-init.d/00-aaa_dockerfile_backup.sh b/radarr/root/etc/cont-init.d/00-aaa_dockerfile_backup.sh new file mode 100644 index 000000000..612e26d7e --- /dev/null +++ b/radarr/root/etc/cont-init.d/00-aaa_dockerfile_backup.sh @@ -0,0 +1,29 @@ +#!/bin/bash +# If dockerfile failed install manually +if [ ! -f "/usr/bin/bashio" ]; then + echo "Bashio does not exist, executing script" + ( + ################ + # Install apps # + ################ + PACKAGES="${PACKAGES:="curl"}" + + apt-get clean \ + && apt-get update \ + && apt-get install -y --no-install-recommends ${PACKAGES} 2>/dev/null \ + || apk add --no-cache ${PACKAGES} + + ################### + # Install bashio # + ################## + + mkdir -p /tmp/bashio + curl -L -f -s "https://github.com/hassio-addons/bashio/archive/v${BASHIO_VERSION}.tar.gz" | + tar -xzf - --strip 1 -C /tmp/bashio + mv /tmp/bashio/lib /usr/lib/bashio + ln -s /usr/lib/bashio/bashio /usr/bin/bashio + rm -rf /tmp/bashio + + ) >/dev/null + +fi diff --git a/readarr/Dockerfile b/readarr/Dockerfile index 58ca190b6..188b0a0b4 100644 --- a/readarr/Dockerfile +++ b/readarr/Dockerfile @@ -2,6 +2,12 @@ ARG BUILD_FROM ARG BUILD_VERSION FROM ${BUILD_FROM} ENV BASHIO_VERSION=0.14.3 +ENV PACKAGES="jq \ + curl \ + cifs-utils \ + keyutils \ + samba \ + smbclient" RUN \ ################ @@ -9,13 +15,7 @@ RUN \ ################ apt-get clean \ && apt-get update \ - && apt-get install -y \ - jq \ - curl \ - cifs-utils \ - keyutils \ - samba \ - smbclient \ + && apt-get install -y --no-install-recommends ${PACKAGES} \ \ ################### # Install bashio # diff --git a/readarr/root/etc/cont-init.d/00-aaa_dockerfile_backup.sh b/readarr/root/etc/cont-init.d/00-aaa_dockerfile_backup.sh new file mode 100644 index 000000000..612e26d7e --- /dev/null +++ b/readarr/root/etc/cont-init.d/00-aaa_dockerfile_backup.sh @@ -0,0 +1,29 @@ +#!/bin/bash +# If dockerfile failed install manually +if [ ! -f "/usr/bin/bashio" ]; then + echo "Bashio does not exist, executing script" + ( + ################ + # Install apps # + ################ + PACKAGES="${PACKAGES:="curl"}" + + apt-get clean \ + && apt-get update \ + && apt-get install -y --no-install-recommends ${PACKAGES} 2>/dev/null \ + || apk add --no-cache ${PACKAGES} + + ################### + # Install bashio # + ################## + + mkdir -p /tmp/bashio + curl -L -f -s "https://github.com/hassio-addons/bashio/archive/v${BASHIO_VERSION}.tar.gz" | + tar -xzf - --strip 1 -C /tmp/bashio + mv /tmp/bashio/lib /usr/lib/bashio + ln -s /usr/lib/bashio/bashio /usr/bin/bashio + rm -rf /tmp/bashio + + ) >/dev/null + +fi diff --git a/requestrr/Dockerfile b/requestrr/Dockerfile index e1e350bb5..f7432f6b0 100644 --- a/requestrr/Dockerfile +++ b/requestrr/Dockerfile @@ -2,6 +2,12 @@ ARG BUILD_FROM ARG BUILD_VERSION FROM ${BUILD_FROM} ENV BASHIO_VERSION=0.14.3 +ENV PACKAGES="jq \ + curl \ + cifs-utils \ + keyutils \ + samba \ + smbclient" RUN \ ################ @@ -9,13 +15,7 @@ RUN \ ################ apt-get clean \ && apt-get update \ - && apt-get install -y \ - jq \ - curl \ - cifs-utils \ - keyutils \ - samba \ - smbclient \ + && apt-get install -y --no-install-recommends ${PACKAGES} \ \ ################## # Install bashio # diff --git a/requestrr/root/etc/cont-init.d/00-aaa_dockerfile_backup.sh b/requestrr/root/etc/cont-init.d/00-aaa_dockerfile_backup.sh new file mode 100644 index 000000000..612e26d7e --- /dev/null +++ b/requestrr/root/etc/cont-init.d/00-aaa_dockerfile_backup.sh @@ -0,0 +1,29 @@ +#!/bin/bash +# If dockerfile failed install manually +if [ ! -f "/usr/bin/bashio" ]; then + echo "Bashio does not exist, executing script" + ( + ################ + # Install apps # + ################ + PACKAGES="${PACKAGES:="curl"}" + + apt-get clean \ + && apt-get update \ + && apt-get install -y --no-install-recommends ${PACKAGES} 2>/dev/null \ + || apk add --no-cache ${PACKAGES} + + ################### + # Install bashio # + ################## + + mkdir -p /tmp/bashio + curl -L -f -s "https://github.com/hassio-addons/bashio/archive/v${BASHIO_VERSION}.tar.gz" | + tar -xzf - --strip 1 -C /tmp/bashio + mv /tmp/bashio/lib /usr/lib/bashio + ln -s /usr/lib/bashio/bashio /usr/bin/bashio + rm -rf /tmp/bashio + + ) >/dev/null + +fi diff --git a/resiliosync/Dockerfile b/resiliosync/Dockerfile index af156d4d6..b61fbed9c 100644 --- a/resiliosync/Dockerfile +++ b/resiliosync/Dockerfile @@ -2,6 +2,12 @@ ARG BUILD_FROM ARG BUILD_VERSION FROM ${BUILD_FROM} ENV BASHIO_VERSION=0.14.3 +ENV PACKAGES="jq \ + curl \ + cifs-utils \ + keyutils \ + samba \ + smbclient" RUN \ ################ @@ -9,13 +15,7 @@ RUN \ ################ apt-get clean \ && apt-get update \ - && apt-get install -y --no-install-recommends \ - jq \ - curl \ - cifs-utils \ - keyutils \ - samba \ - smbclient \ + && apt-get install -y --no-install-recommends ${PACKAGES} \ \ ################## # Install bashio # diff --git a/resiliosync/rootfs/etc/cont-init.d/00-aaa_dockerfile_backup.sh b/resiliosync/rootfs/etc/cont-init.d/00-aaa_dockerfile_backup.sh index 515a80175..612e26d7e 100644 --- a/resiliosync/rootfs/etc/cont-init.d/00-aaa_dockerfile_backup.sh +++ b/resiliosync/rootfs/etc/cont-init.d/00-aaa_dockerfile_backup.sh @@ -1,5 +1,4 @@ #!/bin/bash - # If dockerfile failed install manually if [ ! -f "/usr/bin/bashio" ]; then echo "Bashio does not exist, executing script" @@ -7,29 +6,23 @@ if [ ! -f "/usr/bin/bashio" ]; then ################ # Install apps # ################ + PACKAGES="${PACKAGES:="curl"}" + apt-get clean \ - apt-get update \ - apt-get install -y --no-install-recommends \ - jq \ - curl \ - cifs-utils \ - keyutils \ - samba \ - smbclient + && apt-get update \ + && apt-get install -y --no-install-recommends ${PACKAGES} 2>/dev/null \ + || apk add --no-cache ${PACKAGES} - ################## + ################### # Install bashio # ################## - curl -J -L -o /tmp/bashio.tar.gz \ - "https://github.com/hassio-addons/bashio/archive/v${BASHIO_VERSION}.tar.gz" && - mkdir /tmp/bashio && - tar zxvf \ - /tmp/bashio.tar.gz \ - --strip 1 -C /tmp/bashio && - mv /tmp/bashio/lib /usr/lib/bashio && - ln -s /usr/lib/bashio/bashio /usr/bin/bashio && - rm -fr \ - /tmp/* + + mkdir -p /tmp/bashio + curl -L -f -s "https://github.com/hassio-addons/bashio/archive/v${BASHIO_VERSION}.tar.gz" | + tar -xzf - --strip 1 -C /tmp/bashio + mv /tmp/bashio/lib /usr/lib/bashio + ln -s /usr/lib/bashio/bashio /usr/bin/bashio + rm -rf /tmp/bashio ) >/dev/null diff --git a/scrutiny/Dockerfile b/scrutiny/Dockerfile index cbe644059..19e641ab1 100644 --- a/scrutiny/Dockerfile +++ b/scrutiny/Dockerfile @@ -7,21 +7,15 @@ COPY rootfs / # Base system ENV BASHIO_VERSION=0.14.3 -ARG TEMPIO_VERSION=2021.01.0 ARG BUILD_ARCH +ENV PACKAGES="jq \ + curl \ + cifs-utils \ + nginx" RUN \ # Add apps - apk add --no-cache \ - jq \ - curl \ - cifs-utils \ - nginx \ - \ - # Install tempio - && curl -L -f -s -o /usr/bin/tempio \ - "https://github.com/home-assistant/tempio/releases/download/${TEMPIO_VERSION}/tempio_${BUILD_ARCH}" \ - && chmod a+x /usr/bin/tempio \ + apk add --no-cache ${PACKAGES} \ \ ################## # Install bashio # diff --git a/scrutiny/rootfs/etc/cont-init.d/00-aaa_dockerfile_backup.sh b/scrutiny/rootfs/etc/cont-init.d/00-aaa_dockerfile_backup.sh index 85403e096..612e26d7e 100644 --- a/scrutiny/rootfs/etc/cont-init.d/00-aaa_dockerfile_backup.sh +++ b/scrutiny/rootfs/etc/cont-init.d/00-aaa_dockerfile_backup.sh @@ -6,11 +6,12 @@ if [ ! -f "/usr/bin/bashio" ]; then ################ # Install apps # ################ - apk add --no-cache \ - jq \ - curl \ - cifs-utils \ - nginx + PACKAGES="${PACKAGES:="curl"}" + + apt-get clean \ + && apt-get update \ + && apt-get install -y --no-install-recommends ${PACKAGES} 2>/dev/null \ + || apk add --no-cache ${PACKAGES} ################### # Install bashio # @@ -23,13 +24,6 @@ if [ ! -f "/usr/bin/bashio" ]; then ln -s /usr/lib/bashio/bashio /usr/bin/bashio rm -rf /tmp/bashio - ################### - # Install tempio # - ################## - curl -L -f -s -o /usr/bin/tempio \ - "https://github.com/home-assistant/tempio/releases/download/${TEMPIO_VERSION}/tempio_${BUILD_ARCH}" \ - && chmod a+x /usr/bin/tempio - ) >/dev/null fi diff --git a/sonarr/Dockerfile b/sonarr/Dockerfile index 6b06a150f..6576aeb86 100644 --- a/sonarr/Dockerfile +++ b/sonarr/Dockerfile @@ -3,6 +3,12 @@ ARG BUILD_VERSION ARG BUILD_UPSTREAM="3.0.6.1342" FROM ${BUILD_FROM} ENV BASHIO_VERSION=0.14.3 +ENV PACKAGES="jq \ + curl \ + cifs-utils \ + keyutils \ + samba \ + smbclient" RUN \ ################ @@ -10,13 +16,7 @@ RUN \ ################ apt-get clean \ && apt-get update \ - && apt-get install -y \ - jq \ - curl \ - cifs-utils \ - keyutils \ - samba \ - smbclient \ + && apt-get install -y --no-install-recommends ${PACKAGES} \ \ ################## # Install bashio # diff --git a/sonarr/root/etc/cont-init.d/00-aaa_dockerfile_backup.sh b/sonarr/root/etc/cont-init.d/00-aaa_dockerfile_backup.sh new file mode 100644 index 000000000..612e26d7e --- /dev/null +++ b/sonarr/root/etc/cont-init.d/00-aaa_dockerfile_backup.sh @@ -0,0 +1,29 @@ +#!/bin/bash +# If dockerfile failed install manually +if [ ! -f "/usr/bin/bashio" ]; then + echo "Bashio does not exist, executing script" + ( + ################ + # Install apps # + ################ + PACKAGES="${PACKAGES:="curl"}" + + apt-get clean \ + && apt-get update \ + && apt-get install -y --no-install-recommends ${PACKAGES} 2>/dev/null \ + || apk add --no-cache ${PACKAGES} + + ################### + # Install bashio # + ################## + + mkdir -p /tmp/bashio + curl -L -f -s "https://github.com/hassio-addons/bashio/archive/v${BASHIO_VERSION}.tar.gz" | + tar -xzf - --strip 1 -C /tmp/bashio + mv /tmp/bashio/lib /usr/lib/bashio + ln -s /usr/lib/bashio/bashio /usr/bin/bashio + rm -rf /tmp/bashio + + ) >/dev/null + +fi diff --git a/transmission/Dockerfile b/transmission/Dockerfile index e81fcd3eb..65f488df7 100644 --- a/transmission/Dockerfile +++ b/transmission/Dockerfile @@ -2,13 +2,14 @@ ARG BUILD_FROM ARG BUILD_VERSION FROM ${BUILD_FROM} ENV BASHIO_VERSION=0.14.3 - -# Add bashio -RUN apk add --no-cache \ - curl \ +ENV PACKAGES="curl \ jq \ samba \ - samba-client \ + samba-client" + +# Add bashio +RUN apk add --no-cache ${PACKAGES} \ + \ && curl -J -L -o /tmp/bashio.tar.gz \ "https://github.com/hassio-addons/bashio/archive/v${BASHIO_VERSION}.tar.gz" \ && mkdir /tmp/bashio \ @@ -18,9 +19,10 @@ RUN apk add --no-cache \ \ && mv /tmp/bashio/lib /usr/lib/bashio \ && ln -s /usr/lib/bashio/bashio /usr/bin/bashio \ - && rm -fr /tmp/bashio.tar.gz \ - \ - && ln -s /usr/share/transmission/web/style /transmission-web-control && \ + && rm -fr /tmp/bashio.tar.gz || true + +RUN \ + ln -s /usr/share/transmission/web/style /transmission-web-control && \ ln -s /usr/share/transmission/web/images /transmission-web-control && \ ln -s /usr/share/transmission/web/javascript /transmission-web-control && \ ln -s /usr/share/transmission/web/index.html /transmission-web-control/index.original.html diff --git a/transmission/rootfs/etc/cont-init.d/00-aaa_dockerfile_backup.sh b/transmission/rootfs/etc/cont-init.d/00-aaa_dockerfile_backup.sh new file mode 100644 index 000000000..612e26d7e --- /dev/null +++ b/transmission/rootfs/etc/cont-init.d/00-aaa_dockerfile_backup.sh @@ -0,0 +1,29 @@ +#!/bin/bash +# If dockerfile failed install manually +if [ ! -f "/usr/bin/bashio" ]; then + echo "Bashio does not exist, executing script" + ( + ################ + # Install apps # + ################ + PACKAGES="${PACKAGES:="curl"}" + + apt-get clean \ + && apt-get update \ + && apt-get install -y --no-install-recommends ${PACKAGES} 2>/dev/null \ + || apk add --no-cache ${PACKAGES} + + ################### + # Install bashio # + ################## + + mkdir -p /tmp/bashio + curl -L -f -s "https://github.com/hassio-addons/bashio/archive/v${BASHIO_VERSION}.tar.gz" | + tar -xzf - --strip 1 -C /tmp/bashio + mv /tmp/bashio/lib /usr/lib/bashio + ln -s /usr/lib/bashio/bashio /usr/bin/bashio + rm -rf /tmp/bashio + + ) >/dev/null + +fi diff --git a/ubooquity/Dockerfile b/ubooquity/Dockerfile index 9c8faf37e..8cd04cc9a 100644 --- a/ubooquity/Dockerfile +++ b/ubooquity/Dockerfile @@ -3,14 +3,15 @@ ARG BUILD_VERSION ARG BUILD_UPSTREAM="2.1.2" FROM ${BUILD_FROM} ENV BASHIO_VERSION=0.14.3 - -# Add bashio -RUN apk add --no-cache \ - curl \ +ENV PACKAGES="curl \ jq \ moreutils \ samba \ - nginx \ + nginx" + +# Add bashio +RUN apk add --no-cache ${PACKAGES} \ + \ && curl -J -L -o /tmp/bashio.tar.gz \ "https://github.com/hassio-addons/bashio/archive/v${BASHIO_VERSION}.tar.gz" \ && mkdir /tmp/bashio \ @@ -20,7 +21,7 @@ RUN apk add --no-cache \ \ && mv /tmp/bashio/lib /usr/lib/bashio \ && ln -s /usr/lib/bashio/bashio /usr/bin/bashio \ - && rm -fr /tmp/bashio.tar.gz + && rm -fr /tmp/bashio.tar.gz || true # Copy root filesystem COPY rootfs / diff --git a/ubooquity/rootfs/etc/cont-init.d/00-aaa_dockerfile_backup.sh b/ubooquity/rootfs/etc/cont-init.d/00-aaa_dockerfile_backup.sh new file mode 100644 index 000000000..612e26d7e --- /dev/null +++ b/ubooquity/rootfs/etc/cont-init.d/00-aaa_dockerfile_backup.sh @@ -0,0 +1,29 @@ +#!/bin/bash +# If dockerfile failed install manually +if [ ! -f "/usr/bin/bashio" ]; then + echo "Bashio does not exist, executing script" + ( + ################ + # Install apps # + ################ + PACKAGES="${PACKAGES:="curl"}" + + apt-get clean \ + && apt-get update \ + && apt-get install -y --no-install-recommends ${PACKAGES} 2>/dev/null \ + || apk add --no-cache ${PACKAGES} + + ################### + # Install bashio # + ################## + + mkdir -p /tmp/bashio + curl -L -f -s "https://github.com/hassio-addons/bashio/archive/v${BASHIO_VERSION}.tar.gz" | + tar -xzf - --strip 1 -C /tmp/bashio + mv /tmp/bashio/lib /usr/lib/bashio + ln -s /usr/lib/bashio/bashio /usr/bin/bashio + rm -rf /tmp/bashio + + ) >/dev/null + +fi diff --git a/webtop/Dockerfile b/webtop/Dockerfile index 24aa3a4f4..048226a6e 100644 --- a/webtop/Dockerfile +++ b/webtop/Dockerfile @@ -13,7 +13,7 @@ RUN \ ################ # Install apps # ################ - apk add --no-cache $PACKAGES \ + apk add --no-cache ${PACKAGES} \ \ ################### # Install bashio # diff --git a/webtop/root/etc/cont-init.d/00-aaa_dockerfile_backup.sh b/webtop/root/etc/cont-init.d/00-aaa_dockerfile_backup.sh index 9ff959ced..612e26d7e 100644 --- a/webtop/root/etc/cont-init.d/00-aaa_dockerfile_backup.sh +++ b/webtop/root/etc/cont-init.d/00-aaa_dockerfile_backup.sh @@ -6,8 +6,13 @@ if [ ! -f "/usr/bin/bashio" ]; then ################ # Install apps # ################ - apk add --no-cache $PACKAGES - + PACKAGES="${PACKAGES:="curl"}" + + apt-get clean \ + && apt-get update \ + && apt-get install -y --no-install-recommends ${PACKAGES} 2>/dev/null \ + || apk add --no-cache ${PACKAGES} + ################### # Install bashio # ################## @@ -18,6 +23,7 @@ if [ ! -f "/usr/bin/bashio" ]; then mv /tmp/bashio/lib /usr/lib/bashio ln -s /usr/lib/bashio/bashio /usr/bin/bashio rm -rf /tmp/bashio + ) >/dev/null fi diff --git a/webtrees/Dockerfile b/webtrees/Dockerfile index 0cfe20bb5..ff7a63193 100644 --- a/webtrees/Dockerfile +++ b/webtrees/Dockerfile @@ -6,6 +6,9 @@ ENV BASHIO_VERSION=0.14.3 ENV WEBTREES_HOME="/data/webtrees" WORKDIR $WEBTREES_HOME VOLUME ["/data"] +ENV PACKAGES="jq \ + curl \ + yamllint" RUN \ ################ @@ -13,10 +16,7 @@ RUN \ ################ apt-get clean \ && apt-get update \ - && apt-get install -y \ - jq \ - curl \ - yamllint \ + && apt-get install -y --no-install-recommends ${PACKAGES} \ && apt-get clean \ \ ################## diff --git a/webtrees/rootfs/scripts/00-aaa_dockerfile_backup.sh b/webtrees/rootfs/scripts/00-aaa_dockerfile_backup.sh index 00d0e645c..612e26d7e 100644 --- a/webtrees/rootfs/scripts/00-aaa_dockerfile_backup.sh +++ b/webtrees/rootfs/scripts/00-aaa_dockerfile_backup.sh @@ -6,13 +6,12 @@ if [ ! -f "/usr/bin/bashio" ]; then ################ # Install apps # ################ - apt-get clean - apt-get update - apt-get install -y \ - jq \ - yamllint \ - curl && - apt-get clean + PACKAGES="${PACKAGES:="curl"}" + + apt-get clean \ + && apt-get update \ + && apt-get install -y --no-install-recommends ${PACKAGES} 2>/dev/null \ + || apk add --no-cache ${PACKAGES} ################### # Install bashio # @@ -24,6 +23,7 @@ if [ ! -f "/usr/bin/bashio" ]; then mv /tmp/bashio/lib /usr/lib/bashio ln -s /usr/lib/bashio/bashio /usr/bin/bashio rm -rf /tmp/bashio + ) >/dev/null fi diff --git a/zzz_templates/00-aaa_dockerfile_backup.sh b/zzz_templates/00-aaa_dockerfile_backup.sh new file mode 100644 index 000000000..612e26d7e --- /dev/null +++ b/zzz_templates/00-aaa_dockerfile_backup.sh @@ -0,0 +1,29 @@ +#!/bin/bash +# If dockerfile failed install manually +if [ ! -f "/usr/bin/bashio" ]; then + echo "Bashio does not exist, executing script" + ( + ################ + # Install apps # + ################ + PACKAGES="${PACKAGES:="curl"}" + + apt-get clean \ + && apt-get update \ + && apt-get install -y --no-install-recommends ${PACKAGES} 2>/dev/null \ + || apk add --no-cache ${PACKAGES} + + ################### + # Install bashio # + ################## + + mkdir -p /tmp/bashio + curl -L -f -s "https://github.com/hassio-addons/bashio/archive/v${BASHIO_VERSION}.tar.gz" | + tar -xzf - --strip 1 -C /tmp/bashio + mv /tmp/bashio/lib /usr/lib/bashio + ln -s /usr/lib/bashio/bashio /usr/bin/bashio + rm -rf /tmp/bashio + + ) >/dev/null + +fi