From 2cf7d3bf35e8ae2bf1b5eb6b07ea3afd7b89956b Mon Sep 17 00:00:00 2001 From: TheSpad Date: Fri, 12 May 2023 19:57:09 +0100 Subject: [PATCH 1/3] Bump s6 to 3.1.5.0 (Jammy) --- Dockerfile | 2 +- Dockerfile.aarch64 | 2 +- Dockerfile.armhf | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index c7deb47..da076d3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,7 +27,7 @@ RUN \ /root-out/var/log/* # set version for s6 overlay -ARG S6_OVERLAY_VERSION="3.1.2.1" +ARG S6_OVERLAY_VERSION="3.1.5.0" ARG S6_OVERLAY_ARCH="x86_64" # add s6 overlay diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 01d6e10..a4f5595 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -27,7 +27,7 @@ RUN \ /root-out/var/log/* # set version for s6 overlay -ARG S6_OVERLAY_VERSION="3.1.2.1" +ARG S6_OVERLAY_VERSION="3.1.5.0" ARG S6_OVERLAY_ARCH="aarch64" # add s6 overlay diff --git a/Dockerfile.armhf b/Dockerfile.armhf index 6917357..db011ff 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -27,7 +27,7 @@ RUN \ /root-out/var/log/* # set version for s6 overlay -ARG S6_OVERLAY_VERSION="3.1.2.1" +ARG S6_OVERLAY_VERSION="3.1.5.0" ARG S6_OVERLAY_ARCH="armhf" # add s6 overlay From e8f3de54a9e7d8b4919d18edd1c673d62d1d20e2 Mon Sep 17 00:00:00 2001 From: TheSpad Date: Mon, 15 May 2023 21:26:46 +0100 Subject: [PATCH 2/3] Create lsiopy venv folder and envs --- Dockerfile | 17 ++++++++++------- Dockerfile.aarch64 | 17 ++++++++++------- Dockerfile.armhf | 17 ++++++++++------- 3 files changed, 30 insertions(+), 21 deletions(-) diff --git a/Dockerfile b/Dockerfile index da076d3..e7e4016 100644 --- a/Dockerfile +++ b/Dockerfile @@ -56,12 +56,14 @@ ADD --chmod=744 "https://raw.githubusercontent.com/linuxserver/docker-mods/mod-s # set environment variables ARG DEBIAN_FRONTEND="noninteractive" ENV HOME="/root" \ -LANGUAGE="en_US.UTF-8" \ -LANG="en_US.UTF-8" \ -TERM="xterm" \ -S6_CMD_WAIT_FOR_SERVICES_MAXTIME="0" \ -S6_VERBOSITY=1 \ -S6_STAGE2_HOOK=/docker-mods + LANGUAGE="en_US.UTF-8" \ + LANG="en_US.UTF-8" \ + TERM="xterm" \ + S6_CMD_WAIT_FOR_SERVICES_MAXTIME="0" \ + S6_VERBOSITY=1 \ + S6_STAGE2_HOOK=/docker-mods \ + VIRTUAL_ENV=/lsiopy \ + PATH="/lsiopy/bin:$PATH" # copy sources COPY sources.list /etc/apt/ @@ -119,7 +121,8 @@ RUN \ mkdir -p \ /app \ /config \ - /defaults && \ + /defaults \ + /lsiopy && \ echo "**** cleanup ****" && \ apt-get autoremove && \ apt-get clean && \ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index a4f5595..55f943b 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -56,12 +56,14 @@ ADD --chmod=744 "https://raw.githubusercontent.com/linuxserver/docker-mods/mod-s # set environment variables ARG DEBIAN_FRONTEND="noninteractive" ENV HOME="/root" \ -LANGUAGE="en_US.UTF-8" \ -LANG="en_US.UTF-8" \ -TERM="xterm" \ -S6_CMD_WAIT_FOR_SERVICES_MAXTIME="0" \ -S6_VERBOSITY=1 \ -S6_STAGE2_HOOK=/docker-mods + LANGUAGE="en_US.UTF-8" \ + LANG="en_US.UTF-8" \ + TERM="xterm" \ + S6_CMD_WAIT_FOR_SERVICES_MAXTIME="0" \ + S6_VERBOSITY=1 \ + S6_STAGE2_HOOK=/docker-mods \ + VIRTUAL_ENV=/lsiopy \ + PATH="/lsiopy/bin:$PATH" # copy sources COPY sources.list.arm /etc/apt/sources.list @@ -119,7 +121,8 @@ RUN \ mkdir -p \ /app \ /config \ - /defaults && \ + /defaults \ + /lsiopy && \ echo "**** add qemu ****" && \ curl -o \ /usr/bin/qemu-aarch64-static -L \ diff --git a/Dockerfile.armhf b/Dockerfile.armhf index db011ff..a7859db 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -56,12 +56,14 @@ ADD --chmod=744 "https://raw.githubusercontent.com/linuxserver/docker-mods/mod-s # set environment variables ARG DEBIAN_FRONTEND="noninteractive" ENV HOME="/root" \ -LANGUAGE="en_US.UTF-8" \ -LANG="en_US.UTF-8" \ -TERM="xterm" \ -S6_CMD_WAIT_FOR_SERVICES_MAXTIME="0" \ -S6_VERBOSITY=1 \ -S6_STAGE2_HOOK=/docker-mods + LANGUAGE="en_US.UTF-8" \ + LANG="en_US.UTF-8" \ + TERM="xterm" \ + S6_CMD_WAIT_FOR_SERVICES_MAXTIME="0" \ + S6_VERBOSITY=1 \ + S6_STAGE2_HOOK=/docker-mods \ + VIRTUAL_ENV=/lsiopy \ + PATH="/lsiopy/bin:$PATH" # copy sources COPY sources.list.arm /etc/apt/sources.list @@ -119,7 +121,8 @@ RUN \ mkdir -p \ /app \ /config \ - /defaults && \ + /defaults \ + /lsiopy && \ echo "**** add qemu ****" && \ curl -o \ /usr/bin/qemu-arm-static -L \ From 0f236032893fb91ad4e96ec2945e550fe86ac2d2 Mon Sep 17 00:00:00 2001 From: TheSpad Date: Tue, 16 May 2023 10:44:58 +0100 Subject: [PATCH 3/3] Externalise package-install --- Dockerfile | 2 + Dockerfile.aarch64 | 2 + Dockerfile.armhf | 2 + .../s6-rc.d/init-mods-package-install/run | 44 ------------------- 4 files changed, 6 insertions(+), 44 deletions(-) delete mode 100755 root/etc/s6-overlay/s6-rc.d/init-mods-package-install/run diff --git a/Dockerfile b/Dockerfile index e7e4016..73b1366 100644 --- a/Dockerfile +++ b/Dockerfile @@ -48,10 +48,12 @@ COPY --from=rootfs-stage /root-out/ / ARG BUILD_DATE ARG VERSION ARG MODS_VERSION="v3" +ARG PKG_INST_VERSION="v1" LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" LABEL maintainer="TheLamer" ADD --chmod=744 "https://raw.githubusercontent.com/linuxserver/docker-mods/mod-scripts/docker-mods.${MODS_VERSION}" "/docker-mods" +ADD --chmod=744 "https://raw.githubusercontent.com/linuxserver/docker-mods/mod-scripts/package-install.${PKG_INST_VERSION}" "/etc/s6-overlay/s6-rc.d/init-mods-package-install/run" # set environment variables ARG DEBIAN_FRONTEND="noninteractive" diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 55f943b..dc1e57e 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -48,10 +48,12 @@ COPY --from=rootfs-stage /root-out/ / ARG BUILD_DATE ARG VERSION ARG MODS_VERSION="v3" +ARG PKG_INST_VERSION="v1" LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" LABEL maintainer="TheLamer" ADD --chmod=744 "https://raw.githubusercontent.com/linuxserver/docker-mods/mod-scripts/docker-mods.${MODS_VERSION}" "/docker-mods" +ADD --chmod=744 "https://raw.githubusercontent.com/linuxserver/docker-mods/mod-scripts/package-install.${PKG_INST_VERSION}" "/etc/s6-overlay/s6-rc.d/init-mods-package-install/run" # set environment variables ARG DEBIAN_FRONTEND="noninteractive" diff --git a/Dockerfile.armhf b/Dockerfile.armhf index a7859db..1779de4 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -48,10 +48,12 @@ COPY --from=rootfs-stage /root-out/ / ARG BUILD_DATE ARG VERSION ARG MODS_VERSION="v3" +ARG PKG_INST_VERSION="v1" LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" LABEL maintainer="TheLamer" ADD --chmod=744 "https://raw.githubusercontent.com/linuxserver/docker-mods/mod-scripts/docker-mods.${MODS_VERSION}" "/docker-mods" +ADD --chmod=744 "https://raw.githubusercontent.com/linuxserver/docker-mods/mod-scripts/package-install.${PKG_INST_VERSION}" "/etc/s6-overlay/s6-rc.d/init-mods-package-install/run" # set environment variables ARG DEBIAN_FRONTEND="noninteractive" diff --git a/root/etc/s6-overlay/s6-rc.d/init-mods-package-install/run b/root/etc/s6-overlay/s6-rc.d/init-mods-package-install/run deleted file mode 100755 index 90b4b2e..0000000 --- a/root/etc/s6-overlay/s6-rc.d/init-mods-package-install/run +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/with-contenv bash -# shellcheck shell=bash - -if [[ -f "/mod-repo-packages-to-install.list" ]]; then - IFS=' ' read -ra REPO_PACKAGES <<< "$(tr '\n' ' ' < /mod-repo-packages-to-install.list)" - if [[ ${#REPO_PACKAGES[@]} -ne 0 ]] && [[ ${REPO_PACKAGES[*]} != "" ]]; then - echo "[mod-init] **** Installing all mod packages ****" - if [[ -f /usr/bin/apt ]]; then - export DEBIAN_FRONTEND="noninteractive" - apt-get update - apt-get install -y --no-install-recommends \ - "${REPO_PACKAGES[@]}" - elif [[ -f /sbin/apk ]]; then - apk add --no-cache \ - "${REPO_PACKAGES[@]}" - fi - fi -fi - -if [[ -f "/mod-pip-packages-to-install.list" ]]; then - IFS=' ' read -ra PIP_PACKAGES <<< "$(tr '\n' ' ' < /mod-pip-packages-to-install.list)" - if [[ ${#PIP_PACKAGES[@]} -ne 0 ]] && [[ ${PIP_PACKAGES[*]} != "" ]]; then - echo "[mod-init] **** Installing all pip packages ****" - python3 -m pip install -U pip wheel setuptools - PIP_ARGS=() - if [[ -f /usr/bin/apt ]]; then - PIP_ARGS+=("-f" "https://wheel-index.linuxserver.io/ubuntu/") - elif [[ -f /sbin/apk ]]; then - ALPINE_VER=$(grep main /etc/apk/repositories | sed 's|.*alpine/v||' | sed 's|/main.*||') - if [[ "${ALPINE_VER}" = "3.14" ]]; then - PIP_ARGS+=("-f" "https://wheel-index.linuxserver.io/alpine/") - else - PIP_ARGS+=("-f" "https://wheel-index.linuxserver.io/alpine-${ALPINE_VER}/") - fi - fi - python3 -m pip install \ - "${PIP_ARGS[@]}" \ - "${PIP_PACKAGES[@]}" - fi -fi - -rm -rf \ - /mod-repo-packages-to-install.list \ - /mod-pip-packages-to-install.list