Allow interaction with linuxserver PID/GID

This commit is contained in:
Alexandre
2021-02-05 21:30:38 +01:00
parent 275843bb38
commit 8726231ed2
13 changed files with 68 additions and 39 deletions

View File

@@ -4,7 +4,7 @@ ARG BUILD_VERSION
FROM ${BUILD_FROM}${BUILD_VERSION}
RUN \
# Install bashio
# Install bashio
apt-get update \
\
&& apt-get install -y --no-install-recommends \
@@ -25,17 +25,19 @@ RUN \
/var/{cache,log}/* \
/var/lib/apt/lists/* \
\
# Allow UID and GID setting
# Allow UID and GID setting
&& sed -i 's/bash/bashio/g' /etc/cont-init.d/10-adduser \
&& sed -i 's/{PUID:-911}/(bashio::config "PUID")/g' /etc/cont-init.d/10-adduser \
&& sed -i 's/{PGID:-911}/(bashio::config "PGID")/g' /etc/cont-init.d/10-adduser \
# Remove fixed folders, allows connection to webUI
# 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 \
&& echo 'WebUI\Username=Homeassistant' >> /defaults/qBittorrent.conf
&& echo 'WebUI\Username=Homeassistant' >> /defaults/qBittorrent.conf \
# use /data instead of /config for hass.io environment
&& files=$(grep -rls '/config' /etc) && echo $files | xargs sed -i "s/\\\config/\\\data/g"
# Copy root filesystem
COPY rootfs /
VOLUME [ "/data" "/config" ]
VOLUME [ "/data" ]