mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-03-03 16:00:29 +01:00
Allow interaction with linuxserver PID/GID
This commit is contained in:
@@ -29,7 +29,7 @@
|
|||||||
"PGID": 0
|
"PGID": 0
|
||||||
},
|
},
|
||||||
"schema": {
|
"schema": {
|
||||||
"PUID": "str",
|
"PUID": "int",
|
||||||
"PGID": "str"
|
"PGID": "int"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,11 @@ RUN apt-get update \
|
|||||||
&& ln -s /usr/lib/bashio/bashio /usr/bin/bashio \
|
&& ln -s /usr/lib/bashio/bashio /usr/bin/bashio \
|
||||||
&& rm -fr \
|
&& rm -fr \
|
||||||
/tmp/* \
|
/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
|
# MOFIFY DATA PATH
|
||||||
RUN sed -i "s|config|data|g" /etc/services.d/code-server/run
|
RUN sed -i "s|config|data|g" /etc/services.d/code-server/run
|
||||||
|
|||||||
@@ -26,8 +26,6 @@
|
|||||||
"webui": "http://[HOST]:[PORT:8443]",
|
"webui": "http://[HOST]:[PORT:8443]",
|
||||||
"boot": "auto",
|
"boot": "auto",
|
||||||
"environment": {
|
"environment": {
|
||||||
"PUID": 0,
|
|
||||||
"PGID": 0
|
|
||||||
},
|
},
|
||||||
"options": {
|
"options": {
|
||||||
"PUID": 0,
|
"PUID": 0,
|
||||||
|
|||||||
@@ -19,7 +19,11 @@ RUN apt-get update \
|
|||||||
&& rm -fr \
|
&& rm -fr \
|
||||||
/tmp/* \
|
/tmp/* \
|
||||||
/var/{cache,log}/* \
|
/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 local files
|
||||||
COPY root/ /
|
COPY root/ /
|
||||||
|
|||||||
@@ -24,7 +24,11 @@ RUN apt-get update \
|
|||||||
&& rm -fr \
|
&& rm -fr \
|
||||||
/tmp/* \
|
/tmp/* \
|
||||||
/var/{cache,log}/* \
|
/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 \
|
RUN sed -i "s|/config|/emby|g" /etc/services.d/emby/run \
|
||||||
&& sed -i "s|/config|/emby|g" /etc/cont-init.d/30-config
|
&& sed -i "s|/config|/emby|g" /etc/cont-init.d/30-config
|
||||||
|
|||||||
@@ -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 \
|
&& mv /tmp/bashio/lib /usr/lib/bashio \
|
||||||
&& ln -s /usr/lib/bashio/bashio /usr/bin/bashio \
|
&& ln -s /usr/lib/bashio/bashio /usr/bin/bashio \
|
||||||
&& rm -fr /tmp/bashio.tar.gz \
|
&& rm -fr /tmp/bashio.tar.gz \
|
||||||
|| echo "Error, no OCR available"
|
|| echo "Error, no OCR available"
|
||||||
|
|
||||||
# modify/copy files
|
# modify/copy files
|
||||||
RUN sed -i "s|data|share/nextcloud|g" /etc/cont-init.d/* \
|
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|config|data/config|g" /etc/cont-init.d/* \
|
||||||
&& sed -i "s|data|share/nextcloud|g" /etc/services.d/nginx/* \
|
&& 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/ /
|
COPY root/ /
|
||||||
|
|
||||||
|
|||||||
@@ -29,8 +29,8 @@
|
|||||||
"webui": "https://[HOST]:[PORT:443]",
|
"webui": "https://[HOST]:[PORT:443]",
|
||||||
"panel_icon": "mdi:cloud",
|
"panel_icon": "mdi:cloud",
|
||||||
"options": {
|
"options": {
|
||||||
"PUID": 1001,
|
"PUID": 0,
|
||||||
"PGID": 1001,
|
"PGID": 0,
|
||||||
"trusted_domains": ["your-domain"],
|
"trusted_domains": ["your-domain"],
|
||||||
"OCR": false,
|
"OCR": false,
|
||||||
"OCRLANG": "fra"
|
"OCRLANG": "fra"
|
||||||
|
|||||||
@@ -4,25 +4,29 @@ ARG BUILD_VERSION
|
|||||||
FROM ${BUILD_FROM}${BUILD_VERSION}
|
FROM ${BUILD_FROM}${BUILD_VERSION}
|
||||||
|
|
||||||
# Add bashio
|
# Add bashio
|
||||||
#RUN apk add --no-cache \
|
RUN apk add --no-cache \
|
||||||
# curl \
|
curl \
|
||||||
# jq \
|
jq \
|
||||||
# && curl -J -L -o /tmp/bashio.tar.gz \
|
&& curl -J -L -o /tmp/bashio.tar.gz \
|
||||||
# "https://github.com/hassio-addons/bashio/archive/v0.7.1.tar.gz" \
|
"https://github.com/hassio-addons/bashio/archive/v0.7.1.tar.gz" \
|
||||||
# && mkdir /tmp/bashio \
|
&& mkdir /tmp/bashio \
|
||||||
# && tar zxvf \
|
&& tar zxvf \
|
||||||
# /tmp/bashio.tar.gz \
|
/tmp/bashio.tar.gz \
|
||||||
# --strip 1 -C /tmp/bashio \
|
--strip 1 -C /tmp/bashio \
|
||||||
# \
|
\
|
||||||
# && mv /tmp/bashio/lib /usr/lib/bashio \
|
&& mv /tmp/bashio/lib /usr/lib/bashio \
|
||||||
# && ln -s /usr/lib/bashio/bashio /usr/bin/bashio \
|
&& ln -s /usr/lib/bashio/bashio /usr/bin/bashio \
|
||||||
# && rm -fr /tmp/bashio.tar.gz
|
&& rm -fr /tmp/bashio.tar.gz
|
||||||
|
|
||||||
# Copy root filesystem
|
# Copy root filesystem
|
||||||
# COPY rootfs /
|
COPY rootfs /
|
||||||
|
|
||||||
# MOFIFY DATA PATH
|
# MOFIFY DATA PATH
|
||||||
RUN sed -i "s|/data/media|/share/papermerge/media|g" /defaults/papermerge.conf.py \
|
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" ]
|
VOLUME [ "/data" "/share" ]
|
||||||
|
|||||||
@@ -29,8 +29,8 @@
|
|||||||
"PGID": 0
|
"PGID": 0
|
||||||
},
|
},
|
||||||
"options": {
|
"options": {
|
||||||
"PUID": 1000,
|
"PUID": 0,
|
||||||
"PGID": 1000
|
"PGID": 0
|
||||||
},
|
},
|
||||||
"schema": {
|
"schema": {
|
||||||
"PUID": "int",
|
"PUID": "int",
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ ARG BUILD_VERSION
|
|||||||
FROM ${BUILD_FROM}${BUILD_VERSION}
|
FROM ${BUILD_FROM}${BUILD_VERSION}
|
||||||
|
|
||||||
RUN \
|
RUN \
|
||||||
# Install bashio
|
# Install bashio
|
||||||
apt-get update \
|
apt-get update \
|
||||||
\
|
\
|
||||||
&& apt-get install -y --no-install-recommends \
|
&& apt-get install -y --no-install-recommends \
|
||||||
@@ -25,17 +25,19 @@ RUN \
|
|||||||
/var/{cache,log}/* \
|
/var/{cache,log}/* \
|
||||||
/var/lib/apt/lists/* \
|
/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/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/{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 \
|
&& 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 \
|
&& sed '11,13d' /defaults/qBittorrent.conf \
|
||||||
&& echo 'WebUI\HostHeaderValidation=false' >> /defaults/qBittorrent.conf \
|
&& echo 'WebUI\HostHeaderValidation=false' >> /defaults/qBittorrent.conf \
|
||||||
&& echo 'WebUI\LocalHostAuth=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 root filesystem
|
||||||
COPY rootfs /
|
COPY rootfs /
|
||||||
|
|
||||||
VOLUME [ "/data" "/config" ]
|
VOLUME [ "/data" ]
|
||||||
|
|||||||
@@ -16,7 +16,12 @@ RUN curl -J -L -o /tmp/bashio.tar.gz \
|
|||||||
|
|
||||||
# use /data instead of /config for hass.io environment
|
# use /data instead of /config for hass.io environment
|
||||||
RUN sed -i "s|/config|/config/radarr|g" /etc/services.d/radarr/run \
|
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 local files
|
||||||
COPY root/ /
|
COPY root/ /
|
||||||
|
|||||||
@@ -37,8 +37,8 @@
|
|||||||
"PGID": 0
|
"PGID": 0
|
||||||
},
|
},
|
||||||
"options": {
|
"options": {
|
||||||
"PUID": 1001,
|
"PUID": 0,
|
||||||
"PGID": 1001,
|
"PGID": 0,
|
||||||
"localdisks": ["sda1"],
|
"localdisks": ["sda1"],
|
||||||
"networkdisks": "<//SERVER/SHARE>",
|
"networkdisks": "<//SERVER/SHARE>",
|
||||||
"cifsusername": "<username>",
|
"cifsusername": "<username>",
|
||||||
|
|||||||
@@ -23,6 +23,10 @@ COPY rootfs /
|
|||||||
|
|
||||||
# MOFIFY DATA PATH
|
# MOFIFY DATA PATH
|
||||||
RUN sed -i "s|config|share/transmission|g" /etc/services.d/transmission/run \
|
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" ]
|
VOLUME [ "/data" ]
|
||||||
|
|||||||
Reference in New Issue
Block a user