Move tmpdir, don't chown /data if it's not mounted

This commit is contained in:
thespad 2024-07-03 14:49:57 +01:00
parent 51f656d835
commit f3f6853f56
No known key found for this signature in database
GPG Key ID: 08F06191F4587860
4 changed files with 18 additions and 9 deletions

View File

@ -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" && \

View File

@ -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" && \

View File

@ -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: |

View File

@ -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