Update Dockerfile

This commit is contained in:
Alexandre
2022-09-09 17:02:46 +02:00
committed by GitHub
parent 7912a25b9c
commit abfdaebfe4

View File

@@ -37,8 +37,19 @@ ENV \
S6_CMD_WAIT_FOR_SERVICES=1 \ S6_CMD_WAIT_FOR_SERVICES=1 \
TERM="xterm-256color" TERM="xterm-256color"
# Image specific modifications
RUN \
# Set download folder to /share
&& sed -i 's|/downloads/|/share/qBittorrent/|g' /defaults/qBittorrent.conf \
\
# Remove fixed folders, allows connection to webUI
&& sed '11,13d' /defaults/qBittorrent.conf \
&& echo 'WebUI\HostHeaderValidation=false' >> /defaults/qBittorrent.conf \
&& echo 'WebUI\LocalHostAuth=false' >> /defaults/qBittorrent.conf
# Global LSIO modifications
# hadolint ignore=SC2015 # hadolint ignore=SC2015
ARG CONFIGLOCATION="/config/qBittorrent" ARG CONFIGLOCATION="/config"
RUN \ RUN \
# Avoid custom-init.d duplications # Avoid custom-init.d duplications
rm -f $(grep -sril "Potential tampering with custom" /etc/cont-init.d /etc/s6-overlay/s6-rc.d) \ rm -f $(grep -sril "Potential tampering with custom" /etc/cont-init.d /etc/s6-overlay/s6-rc.d) \
@@ -49,16 +60,11 @@ RUN \
sed -i 's/{PUID:-911}/(bashio::config "PUID")/g' "$file" && \ sed -i 's/{PUID:-911}/(bashio::config "PUID")/g' "$file" && \
sed -i 's/{PGID:-911}/(bashio::config "PGID")/g' "$file"; done \ sed -i 's/{PGID:-911}/(bashio::config "PGID")/g' "$file"; done \
\ \
# Correct permissions # Correct config location
&& sed -i "s=/config=$CONFIGLOCATION || true=g" $(grep -sril '/config[ /$]' /etc/cont-init.d /etc/services.d /etc/s6-overlay/s6-rc.d) \ && sed -i "s=/config=$CONFIGLOCATION || true=g" $(grep -sril '/config[ /$]' /etc/cont-init.d /etc/services.d /etc/s6-overlay/s6-rc.d) \
\ \
# Set download folder to /share # Avoid changing /config permissions
&& sed -i 's|/downloads/|/share/qBittorrent/|g' /defaults/qBittorrent.conf \ && sed -i "/chown abc:abc \/config/d" $(grep -sril 'chown abc:abc /config[ /$]' /etc/cont-init.d /etc/services.d /etc/s6-overlay/s6-rc.d)
\
# Remove fixed folders, allows connection to webUI
&& sed '11,13d' /defaults/qBittorrent.conf \
&& echo 'WebUI\HostHeaderValidation=false' >> /defaults/qBittorrent.conf \
&& echo 'WebUI\LocalHostAuth=false' >> /defaults/qBittorrent.conf
################## ##################
# 3 Install apps # # 3 Install apps #