diff --git a/cloudcommander/config.json b/cloudcommander/config.json index 67dd76bf1..f1c2ab868 100644 --- a/cloudcommander/config.json +++ b/cloudcommander/config.json @@ -29,7 +29,7 @@ "PGID": 0 }, "schema": { - "PUID": "str", - "PGID": "str" + "PUID": "int", + "PGID": "int" } } diff --git a/code-server/Dockerfile b/code-server/Dockerfile index 12c0c441c..18cd37a5a 100644 --- a/code-server/Dockerfile +++ b/code-server/Dockerfile @@ -18,7 +18,11 @@ RUN apt-get update \ && ln -s /usr/lib/bashio/bashio /usr/bin/bashio \ && rm -fr \ /tmp/* \ - /var/lib/apt/lists/* + /var/lib/apt/lists/* \ + # 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 # MOFIFY DATA PATH RUN sed -i "s|config|data|g" /etc/services.d/code-server/run diff --git a/code-server/config.json b/code-server/config.json index de8c28b1b..763429965 100644 --- a/code-server/config.json +++ b/code-server/config.json @@ -26,8 +26,6 @@ "webui": "http://[HOST]:[PORT:8443]", "boot": "auto", "environment": { - "PUID": 0, - "PGID": 0 }, "options": { "PUID": 0, diff --git a/doublecommander/Dockerfile b/doublecommander/Dockerfile index 8107c9807..cef8d7bfd 100644 --- a/doublecommander/Dockerfile +++ b/doublecommander/Dockerfile @@ -19,7 +19,11 @@ RUN apt-get update \ && rm -fr \ /tmp/* \ /var/{cache,log}/* \ - /var/lib/apt/lists/* + /var/lib/apt/lists/* \ + # 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 # copy local files COPY root/ / diff --git a/emby/Dockerfile b/emby/Dockerfile index 964f5c845..c4bd923ba 100644 --- a/emby/Dockerfile +++ b/emby/Dockerfile @@ -24,7 +24,11 @@ RUN apt-get update \ && rm -fr \ /tmp/* \ /var/{cache,log}/* \ - /var/lib/apt/lists/* + /var/lib/apt/lists/* \ + # 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 RUN sed -i "s|/config|/emby|g" /etc/services.d/emby/run \ && sed -i "s|/config|/emby|g" /etc/cont-init.d/30-config diff --git a/nextcloud/Dockerfile b/nextcloud/Dockerfile index b37b44d77..802ddb63d 100644 --- a/nextcloud/Dockerfile +++ b/nextcloud/Dockerfile @@ -26,13 +26,17 @@ RUN echo 'https://dl-3.alpinelinux.org/alpine/latest-stable/main' > /etc/apk/rep && mv /tmp/bashio/lib /usr/lib/bashio \ && ln -s /usr/lib/bashio/bashio /usr/bin/bashio \ && rm -fr /tmp/bashio.tar.gz \ - || echo "Error, no OCR available" + || echo "Error, no OCR available" # modify/copy files RUN sed -i "s|data|share/nextcloud|g" /etc/cont-init.d/* \ && sed -i "s|config|data/config|g" /etc/cont-init.d/* \ && sed -i "s|data|share/nextcloud|g" /etc/services.d/nginx/* \ - && sed -i "s|config|data/config|g" /etc/services.d/nginx/* + && sed -i "s|config|data/config|g" /etc/services.d/nginx/* \ + # 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 COPY root/ / diff --git a/nextcloud/config.json b/nextcloud/config.json index 72b7507dd..71cae6817 100644 --- a/nextcloud/config.json +++ b/nextcloud/config.json @@ -29,8 +29,8 @@ "webui": "https://[HOST]:[PORT:443]", "panel_icon": "mdi:cloud", "options": { - "PUID": 1001, - "PGID": 1001, + "PUID": 0, + "PGID": 0, "trusted_domains": ["your-domain"], "OCR": false, "OCRLANG": "fra" diff --git a/papermerge/Dockerfile b/papermerge/Dockerfile index 01e8d52b0..684ab9aa2 100644 --- a/papermerge/Dockerfile +++ b/papermerge/Dockerfile @@ -4,25 +4,29 @@ ARG BUILD_VERSION FROM ${BUILD_FROM}${BUILD_VERSION} # Add bashio -#RUN apk add --no-cache \ -# curl \ -# jq \ -# && curl -J -L -o /tmp/bashio.tar.gz \ -# "https://github.com/hassio-addons/bashio/archive/v0.7.1.tar.gz" \ -# && mkdir /tmp/bashio \ -# && tar zxvf \ -# /tmp/bashio.tar.gz \ -# --strip 1 -C /tmp/bashio \ -# \ -# && mv /tmp/bashio/lib /usr/lib/bashio \ -# && ln -s /usr/lib/bashio/bashio /usr/bin/bashio \ -# && rm -fr /tmp/bashio.tar.gz +RUN apk add --no-cache \ + curl \ + jq \ + && curl -J -L -o /tmp/bashio.tar.gz \ + "https://github.com/hassio-addons/bashio/archive/v0.7.1.tar.gz" \ + && mkdir /tmp/bashio \ + && tar zxvf \ + /tmp/bashio.tar.gz \ + --strip 1 -C /tmp/bashio \ + \ + && mv /tmp/bashio/lib /usr/lib/bashio \ + && ln -s /usr/lib/bashio/bashio /usr/bin/bashio \ + && rm -fr /tmp/bashio.tar.gz # Copy root filesystem -# COPY rootfs / +COPY rootfs / # MOFIFY DATA PATH RUN sed -i "s|/data/media|/share/papermerge/media|g" /defaults/papermerge.conf.py \ - && sed -i "s|/app/papermerge/static|/share/papermerge/static|g" /defaults/papermerge.conf.py - + && sed -i "s|/app/papermerge/static|/share/papermerge/static|g" /defaults/papermerge.conf.py \ + # 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 + VOLUME [ "/data" "/share" ] diff --git a/papermerge/config.json b/papermerge/config.json index 360f20397..4e7a18dab 100644 --- a/papermerge/config.json +++ b/papermerge/config.json @@ -29,8 +29,8 @@ "PGID": 0 }, "options": { - "PUID": 1000, - "PGID": 1000 + "PUID": 0, + "PGID": 0 }, "schema": { "PUID": "int", diff --git a/qbittorrent/Dockerfile b/qbittorrent/Dockerfile index a8c1192f9..4038dc126 100644 --- a/qbittorrent/Dockerfile +++ b/qbittorrent/Dockerfile @@ -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" ] diff --git a/radarr/Dockerfile b/radarr/Dockerfile index 53b735c9c..2fad446cd 100644 --- a/radarr/Dockerfile +++ b/radarr/Dockerfile @@ -16,7 +16,12 @@ RUN curl -J -L -o /tmp/bashio.tar.gz \ # use /data instead of /config for hass.io environment RUN sed -i "s|/config|/config/radarr|g" /etc/services.d/radarr/run \ - && sed -i "s|/config|/config/radarr|g" /etc/cont-init.d/30-config + && sed -i "s|/config|/config/radarr|g" /etc/cont-init.d/30-config \ + \ + # 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 # copy local files COPY root/ / diff --git a/radarr/config.json b/radarr/config.json index 2f9a710f9..ce45f2f62 100644 --- a/radarr/config.json +++ b/radarr/config.json @@ -37,8 +37,8 @@ "PGID": 0 }, "options": { - "PUID": 1001, - "PGID": 1001, + "PUID": 0, + "PGID": 0, "localdisks": ["sda1"], "networkdisks": "", "cifsusername": "", diff --git a/transmission/Dockerfile b/transmission/Dockerfile index e1261543e..b7efb02cf 100644 --- a/transmission/Dockerfile +++ b/transmission/Dockerfile @@ -23,6 +23,10 @@ COPY rootfs / # MOFIFY DATA PATH RUN sed -i "s|config|share/transmission|g" /etc/services.d/transmission/run \ - && sed -i "s|config|share/transmission|g" /etc/cont-init.d/20-config + && sed -i "s|config|share/transmission|g" /etc/cont-init.d/20-config \ + # 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 VOLUME [ "/data" ]