From f3f6853f5697cc83eaae648819b64121972db382 Mon Sep 17 00:00:00 2001 From: thespad Date: Wed, 3 Jul 2024 14:49:57 +0100 Subject: [PATCH] Move tmpdir, don't chown /data if it's not mounted --- Dockerfile | 8 +++++--- Dockerfile.aarch64 | 8 +++++--- readme-vars.yml | 2 ++ root/etc/s6-overlay/s6-rc.d/init-flexget-config/run | 9 ++++++--- 4 files changed, 18 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index 14cf91f..da40f4e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,8 @@ # syntax=docker/dockerfile:1 -FROM ghcr.io/linuxserver/unrar:latest as unrar +FROM ghcr.io/linuxserver/unrar:latest AS unrar -FROM ghcr.io/by275/libtorrent:2-alpine3.20 as libtorrent +FROM ghcr.io/by275/libtorrent:2-alpine3.20 AS libtorrent FROM ghcr.io/linuxserver/baseimage-alpine:3.20 @@ -15,7 +15,8 @@ LABEL maintainer="thespad" # environment settings ENV HOME="/config" \ - PYTHONIOENCODING=utf-8 + PYTHONIOENCODING=utf-8 \ + TMPDIR=/run/flexget-temp RUN \ echo "**** install packages ****" && \ @@ -36,6 +37,7 @@ RUN \ | awk '/tag_name/{print $4;exit}' FS='[""]'); \ fi && \ mkdir -p /tmp/flexget && \ + mkdir -p /data && \ curl -o \ /tmp/flexget.tar.gz -L \ "https://github.com/flexget/flexget/releases/download/${FLEXGET_VERSION}/FlexGet-${FLEXGET_VERSION#v}.tar.gz" && \ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index d5e717f..9155ed9 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -1,8 +1,8 @@ # syntax=docker/dockerfile:1 -FROM ghcr.io/linuxserver/unrar:arm64v8-latest as unrar +FROM ghcr.io/linuxserver/unrar:arm64v8-latest AS unrar -FROM ghcr.io/by275/libtorrent:2-alpine3.20 as libtorrent +FROM ghcr.io/by275/libtorrent:2-alpine3.20 AS libtorrent FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.20 @@ -15,7 +15,8 @@ LABEL maintainer="thespad" # environment settings ENV HOME="/config" \ - PYTHONIOENCODING=utf-8 + PYTHONIOENCODING=utf-8 \ + TMPDIR=/run/flexget-temp RUN \ echo "**** install packages ****" && \ @@ -36,6 +37,7 @@ RUN \ | awk '/tag_name/{print $4;exit}' FS='[""]'); \ fi && \ mkdir -p /tmp/flexget && \ + mkdir -p /data && \ curl -o \ /tmp/flexget.tar.gz -L \ "https://github.com/flexget/flexget/releases/download/${FLEXGET_VERSION}/FlexGet-${FLEXGET_VERSION#v}.tar.gz" && \ diff --git a/readme-vars.yml b/readme-vars.yml index d058ae8..cbd2eaa 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -36,6 +36,8 @@ opt_param_usage_include_vols: true opt_param_volumes: - { vol_path: "/data", vol_host_path: "/path/to/downloads", desc: "Default path for downloads." } +readonly_supported: true + # application setup block app_setup_block_enabled: true app_setup_block: | diff --git a/root/etc/s6-overlay/s6-rc.d/init-flexget-config/run b/root/etc/s6-overlay/s6-rc.d/init-flexget-config/run index f58c739..11b33c4 100755 --- a/root/etc/s6-overlay/s6-rc.d/init-flexget-config/run +++ b/root/etc/s6-overlay/s6-rc.d/init-flexget-config/run @@ -3,7 +3,7 @@ mkdir -p \ /config/.flexget \ - /data + /run/flexget-temp FG_CONFIG_FILE="${FG_CONFIG_FILE:-/config/.flexget/config.yml}" case "${FG_CONFIG_FILE}" in @@ -38,6 +38,9 @@ fi # permissions lsiown -R abc:abc \ /config \ + /run/flexget-temp -lsiown abc:abc \ - /data +if grep -qe ' /data ' /proc/mounts; then + lsiown abc:abc \ + /data +fi