From 533d182af5b8fcb8ffec47b18d7572b8b1fd921b Mon Sep 17 00:00:00 2001 From: TheSpad Date: Wed, 5 Oct 2022 18:05:08 +0100 Subject: [PATCH] Pull docker-mods from repo, install jq --- Dockerfile | 5 +++++ Dockerfile.aarch64 | 5 +++++ Dockerfile.armhf | 5 +++++ root/etc/s6-overlay/s6-rc.d/init-envfile/run | 4 ++-- root/usr/bin/with-contenv | 4 ++-- 5 files changed, 19 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index a957a5c..40fa31f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -56,9 +56,12 @@ FROM scratch COPY --from=rootfs-stage /root-out/ / ARG BUILD_DATE ARG VERSION +ARG MODS_VERSION="v3" LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" LABEL maintainer="TheLamer" +ADD "https://raw.githubusercontent.com/linuxserver/docker-mods/mod-scripts/docker-mods.${MODS_VERSION}" "/docker-mods" + # environment variables ENV PS1="$(whoami)@$(hostname):$(pwd)\\$ " \ HOME="/root" \ @@ -74,6 +77,7 @@ RUN \ ca-certificates \ coreutils \ curl \ + jq \ procps \ shadow \ tzdata && \ @@ -85,6 +89,7 @@ RUN \ /app \ /config \ /defaults && \ + chmod +x /docker-mods && \ echo "**** cleanup ****" && \ rm -rf \ /tmp/* diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 6ef78f2..6434ff7 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -56,9 +56,12 @@ FROM scratch COPY --from=rootfs-stage /root-out/ / ARG BUILD_DATE ARG VERSION +ARG MODS_VERSION="v3" LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" LABEL maintainer="TheLamer" +ADD "https://raw.githubusercontent.com/linuxserver/docker-mods/mod-scripts/docker-mods.${MODS_VERSION}" "/docker-mods" + # environment variables ENV PS1="$(whoami)@$(hostname):$(pwd)\\$ " \ HOME="/root" \ @@ -74,6 +77,7 @@ RUN \ ca-certificates \ coreutils \ curl \ + jq \ procps \ shadow \ tzdata && \ @@ -85,6 +89,7 @@ RUN \ /app \ /config \ /defaults && \ + chmod +x /docker-mods && \ echo "**** add qemu ****" && \ curl -o \ /usr/bin/qemu-aarch64-static -L \ diff --git a/Dockerfile.armhf b/Dockerfile.armhf index 46aff45..cc6e34c 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -56,9 +56,12 @@ FROM scratch COPY --from=rootfs-stage /root-out/ / ARG BUILD_DATE ARG VERSION +ARG MODS_VERSION="v3" LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" LABEL maintainer="TheLamer" +ADD "https://raw.githubusercontent.com/linuxserver/docker-mods/mod-scripts/docker-mods.${MODS_VERSION}" "/docker-mods" + # environment variables ENV PS1="$(whoami)@$(hostname):$(pwd)\\$ " \ HOME="/root" \ @@ -74,6 +77,7 @@ RUN \ ca-certificates \ coreutils \ curl \ + jq \ procps \ shadow \ tzdata && \ @@ -85,6 +89,7 @@ RUN \ /app \ /config \ /defaults && \ + chmod +x /docker-mods && \ echo "**** add qemu ****" && \ curl -o \ /usr/bin/qemu-arm-static -L \ diff --git a/root/etc/s6-overlay/s6-rc.d/init-envfile/run b/root/etc/s6-overlay/s6-rc.d/init-envfile/run index 3040a92..5dbf809 100755 --- a/root/etc/s6-overlay/s6-rc.d/init-envfile/run +++ b/root/etc/s6-overlay/s6-rc.d/init-envfile/run @@ -1,8 +1,8 @@ #!/usr/bin/with-contenv bash # shellcheck shell=bash -if find /var/run/s6/container_environment/*"FILE__"* -maxdepth 1 > /dev/null 2>&1; then - for FILENAME in /var/run/s6/container_environment/*; do +if find /run/s6/container_environment/*"FILE__"* -maxdepth 1 > /dev/null 2>&1; then + for FILENAME in /run/s6/container_environment/*; do if [[ "${FILENAME##*/}" == "FILE__"* ]]; then SECRETFILE=$(cat "${FILENAME}") if [[ -f ${SECRETFILE} ]]; then diff --git a/root/usr/bin/with-contenv b/root/usr/bin/with-contenv index e47468c..e9e1bc8 100755 --- a/root/usr/bin/with-contenv +++ b/root/usr/bin/with-contenv @@ -1,9 +1,9 @@ #!/bin/bash -if [[ -f /var/run/s6/container_environment/UMASK ]] && +if [[ -f /run/s6/container_environment/UMASK ]] && { [[ "$(pwdx $$)" =~ "/run/s6/legacy-services/" ]] || [[ "$(pwdx $$)" =~ "/run/s6/services/" ]] || [[ "$(pwdx $$)" =~ "/servicedirs/svc-" ]]; }; then - umask "$(cat /var/run/s6/container_environment/UMASK)" + umask "$(cat /run/s6/container_environment/UMASK)" fi exec /command/with-contenv "$@"