From c4b4cbbdc36b52df75d2f658f75e034ed9197b89 Mon Sep 17 00:00:00 2001 From: aptalca Date: Mon, 17 May 2021 09:37:53 -0400 Subject: [PATCH] update formatting, add lsio wheel index --- Dockerfile | 78 +++++++++++++++++----------------- Dockerfile.aarch64 | 78 +++++++++++++++++----------------- Dockerfile.armhf | 78 +++++++++++++++++----------------- readme-vars.yml | 1 + root/etc/cont-init.d/30-config | 6 +-- root/etc/services.d/mylar/run | 4 +- 6 files changed, 123 insertions(+), 122 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1374f16..b27d378 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,45 +8,45 @@ LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DA LABEL maintainer="aptalca" RUN \ - echo "**** install build dependencies ****" && \ - apk add --no-cache --virtual=build-dependencies \ - build-base \ - curl \ - jpeg-dev \ - jq \ - libffi-dev \ - py3-cffi \ - python3-dev \ - zlib-dev && \ - echo "**** install runtime packages ****" && \ - apk add --no-cache \ - jpeg \ - nodejs \ - py3-pip \ - python3 \ - unrar \ - zlib && \ - pip3 install --no-cache-dir -U \ - pip && \ - echo "**** install mylar3 ****" && \ - if [ -z ${MYLAR3_RELEASE+x} ]; then \ - MYLAR3_RELEASE=$(curl -sX GET https://api.github.com/repos/mylar3/mylar3/commits/python3-dev \ - | jq -r '.sha' | cut -c1-8); \ - fi && \ - mkdir /app/mylar3 && \ - curl -o \ - /tmp/mylar3.tar.gz -L \ - "https://github.com/mylar3/mylar3/archive/${MYLAR3_RELEASE}.tar.gz" && \ - tar xf /tmp/mylar3.tar.gz -C \ - /app/mylar3/ --strip-components=1 && \ - cd /app/mylar3 && \ - pip install --no-cache-dir -r requirements.txt && \ - echo "**** cleanup ****" && \ - apk del --purge \ - build-dependencies && \ - rm -rf \ - /root/.cache \ - /tmp/* + echo "**** install build dependencies ****" && \ + apk add --no-cache --virtual=build-dependencies \ + build-base \ + curl \ + jpeg-dev \ + jq \ + libffi-dev \ + py3-cffi \ + python3-dev \ + zlib-dev && \ + echo "**** install runtime packages ****" && \ + apk add --no-cache \ + jpeg \ + nodejs \ + py3-pip \ + python3 \ + unrar \ + zlib && \ + pip3 install --no-cache-dir -U \ + pip && \ + echo "**** install mylar3 ****" && \ + if [ -z ${MYLAR3_RELEASE+x} ]; then \ + MYLAR3_RELEASE=$(curl -sX GET https://api.github.com/repos/mylar3/mylar3/commits/python3-dev \ + | jq -r '.sha' | cut -c1-8); \ + fi && \ + mkdir /app/mylar3 && \ + curl -o \ + /tmp/mylar3.tar.gz -L \ + "https://github.com/mylar3/mylar3/archive/${MYLAR3_RELEASE}.tar.gz" && \ + tar xf /tmp/mylar3.tar.gz -C \ + /app/mylar3/ --strip-components=1 && \ + cd /app/mylar3 && \ + pip install --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine/ -r requirements.txt && \ + echo "**** cleanup ****" && \ + apk del --purge \ + build-dependencies && \ + rm -rf \ + /root/.cache \ + /tmp/* # add local files COPY root/ / diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index a2cb263..4661626 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -8,45 +8,45 @@ LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DA LABEL maintainer="aptalca" RUN \ - echo "**** install build dependencies ****" && \ - apk add --no-cache --virtual=build-dependencies \ - build-base \ - curl \ - jpeg-dev \ - jq \ - libffi-dev \ - py3-cffi \ - python3-dev \ - zlib-dev && \ - echo "**** install runtime packages ****" && \ - apk add --no-cache \ - jpeg \ - nodejs \ - py3-pip \ - python3 \ - unrar \ - zlib && \ - pip3 install --no-cache-dir -U \ - pip && \ - echo "**** install mylar3 ****" && \ - if [ -z ${MYLAR3_RELEASE+x} ]; then \ - MYLAR3_RELEASE=$(curl -sX GET https://api.github.com/repos/mylar3/mylar3/commits/python3-dev \ - | jq -r '.sha' | cut -c1-8); \ - fi && \ - mkdir /app/mylar3 && \ - curl -o \ - /tmp/mylar3.tar.gz -L \ - "https://github.com/mylar3/mylar3/archive/${MYLAR3_RELEASE}.tar.gz" && \ - tar xf /tmp/mylar3.tar.gz -C \ - /app/mylar3/ --strip-components=1 && \ - cd /app/mylar3 && \ - pip install --no-cache-dir -r requirements.txt && \ - echo "**** cleanup ****" && \ - apk del --purge \ - build-dependencies && \ - rm -rf \ - /root/.cache \ - /tmp/* + echo "**** install build dependencies ****" && \ + apk add --no-cache --virtual=build-dependencies \ + build-base \ + curl \ + jpeg-dev \ + jq \ + libffi-dev \ + py3-cffi \ + python3-dev \ + zlib-dev && \ + echo "**** install runtime packages ****" && \ + apk add --no-cache \ + jpeg \ + nodejs \ + py3-pip \ + python3 \ + unrar \ + zlib && \ + pip3 install --no-cache-dir -U \ + pip && \ + echo "**** install mylar3 ****" && \ + if [ -z ${MYLAR3_RELEASE+x} ]; then \ + MYLAR3_RELEASE=$(curl -sX GET https://api.github.com/repos/mylar3/mylar3/commits/python3-dev \ + | jq -r '.sha' | cut -c1-8); \ + fi && \ + mkdir /app/mylar3 && \ + curl -o \ + /tmp/mylar3.tar.gz -L \ + "https://github.com/mylar3/mylar3/archive/${MYLAR3_RELEASE}.tar.gz" && \ + tar xf /tmp/mylar3.tar.gz -C \ + /app/mylar3/ --strip-components=1 && \ + cd /app/mylar3 && \ + pip install --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine/ -r requirements.txt && \ + echo "**** cleanup ****" && \ + apk del --purge \ + build-dependencies && \ + rm -rf \ + /root/.cache \ + /tmp/* # add local files COPY root/ / diff --git a/Dockerfile.armhf b/Dockerfile.armhf index b3ddc59..53108a3 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -8,45 +8,45 @@ LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DA LABEL maintainer="aptalca" RUN \ - echo "**** install build dependencies ****" && \ - apk add --no-cache --virtual=build-dependencies \ - build-base \ - curl \ - jpeg-dev \ - jq \ - libffi-dev \ - py3-cffi \ - python3-dev \ - zlib-dev && \ - echo "**** install runtime packages ****" && \ - apk add --no-cache \ - jpeg \ - nodejs \ - py3-pip \ - python3 \ - unrar \ - zlib && \ - pip3 install --no-cache-dir -U \ - pip && \ - echo "**** install mylar3 ****" && \ - if [ -z ${MYLAR3_RELEASE+x} ]; then \ - MYLAR3_RELEASE=$(curl -sX GET https://api.github.com/repos/mylar3/mylar3/commits/python3-dev \ - | jq -r '.sha' | cut -c1-8); \ - fi && \ - mkdir /app/mylar3 && \ - curl -o \ - /tmp/mylar3.tar.gz -L \ - "https://github.com/mylar3/mylar3/archive/${MYLAR3_RELEASE}.tar.gz" && \ - tar xf /tmp/mylar3.tar.gz -C \ - /app/mylar3/ --strip-components=1 && \ - cd /app/mylar3 && \ - pip install --no-cache-dir -r requirements.txt && \ - echo "**** cleanup ****" && \ - apk del --purge \ - build-dependencies && \ - rm -rf \ - /root/.cache \ - /tmp/* + echo "**** install build dependencies ****" && \ + apk add --no-cache --virtual=build-dependencies \ + build-base \ + curl \ + jpeg-dev \ + jq \ + libffi-dev \ + py3-cffi \ + python3-dev \ + zlib-dev && \ + echo "**** install runtime packages ****" && \ + apk add --no-cache \ + jpeg \ + nodejs \ + py3-pip \ + python3 \ + unrar \ + zlib && \ + pip3 install --no-cache-dir -U \ + pip && \ + echo "**** install mylar3 ****" && \ + if [ -z ${MYLAR3_RELEASE+x} ]; then \ + MYLAR3_RELEASE=$(curl -sX GET https://api.github.com/repos/mylar3/mylar3/commits/python3-dev \ + | jq -r '.sha' | cut -c1-8); \ + fi && \ + mkdir /app/mylar3 && \ + curl -o \ + /tmp/mylar3.tar.gz -L \ + "https://github.com/mylar3/mylar3/archive/${MYLAR3_RELEASE}.tar.gz" && \ + tar xf /tmp/mylar3.tar.gz -C \ + /app/mylar3/ --strip-components=1 && \ + cd /app/mylar3 && \ + pip install --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine/ -r requirements.txt && \ + echo "**** cleanup ****" && \ + apk del --purge \ + build-dependencies && \ + rm -rf \ + /root/.cache \ + /tmp/* # add local files COPY root/ / diff --git a/readme-vars.yml b/readme-vars.yml index de5f515..234ebfa 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -40,6 +40,7 @@ app_setup_block: | # changelog changelogs: + - { date: "17.05.21:", desc: "Add linuxserver wheel index." } - { date: "23.01.21:", desc: "Rebasing to alpine 3.13." } - { date: "03.01.21:", desc: "Output mylar log to docker log."} - { date: "21.12.20:", desc: "Release `nightly` tag based on commits to upstream `python3-dev` branch."} diff --git a/root/etc/cont-init.d/30-config b/root/etc/cont-init.d/30-config index 6821287..a10679f 100644 --- a/root/etc/cont-init.d/30-config +++ b/root/etc/cont-init.d/30-config @@ -5,9 +5,9 @@ mkdir -p /config/{mylar,scripts} # copy scripts folder to config [[ ! -d /config/scripts/sabnzbd ]] && \ - cp -pr /app/mylar3/post-processing/* /config/scripts/ + cp -pr /app/mylar3/post-processing/* /config/scripts/ # permissions chown -R abc:abc \ - /app/mylar3 \ - /config + /app/mylar3 \ + /config diff --git a/root/etc/services.d/mylar/run b/root/etc/services.d/mylar/run index 7147fe8..19924f6 100644 --- a/root/etc/services.d/mylar/run +++ b/root/etc/services.d/mylar/run @@ -1,5 +1,5 @@ #!/usr/bin/with-contenv bash exec \ - s6-setuidgid abc python3 /app/mylar3/Mylar.py --nolaunch \ - --datadir /config/mylar + s6-setuidgid abc python3 /app/mylar3/Mylar.py --nolaunch \ + --datadir /config/mylar