mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-04-16 04:09:06 +02:00
new LSIO logic
This commit is contained in:
@@ -28,22 +28,24 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \
|
||||
S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0 \
|
||||
S6_SERVICES_GRACETIME=0
|
||||
|
||||
# hadolint ignore=DL4006,SC2013
|
||||
RUN sed -i "s|/config|/config/addons_config/addons_config/overseerr|g" /etc/services.d/overseerr/run \
|
||||
&& sed -i "s|/config|/config/addons_config/addons_config/overseerr|g" /etc/cont-init.d/30-config \
|
||||
\
|
||||
# Global LSIO modifications
|
||||
ARG CONFIGLOCATION="/config/addons_config/overseerr"
|
||||
# hadolint ignore=SC2015, SC2013
|
||||
RUN \
|
||||
# Avoid custom-init.d duplications
|
||||
&& grep -sril "Potential tampering with custom" /etc/cont-init.d /etc/s6-overlay/s6-rc.d | xargs -r rm \
|
||||
for file in $(grep -sril 'Potential tampering with custom' /etc/cont-init.d /etc/services.d /etc/s6-overlay/s6-rc.d); do rm -f "$file"; done \
|
||||
\
|
||||
# Prevent changing ownership of /config
|
||||
#&& grep -sril "/config" /etc/cont-init.d /etc/s6-overlay/s6-rc.d | xargs grep -riL "/config/" | xargs -r rm \
|
||||
&& if [ -f /etc/cont-init.d/10-adduser ]; then sed -i "/chown abc:abc \/config$/d" /etc/cont-init.d/10-adduser; fi \
|
||||
# Create new config folder if needed
|
||||
&& for file in $(grep -srl "PUID:-911" /etc/cont-init.d /etc/s6-overlay/s6-rc.d); do sed -i "1a mkdir -p $CONFIGLOCATION" "$file"; done \
|
||||
\
|
||||
# Allow UID and GID setting
|
||||
&& for file in $(grep -srl "PUID:-911" /etc/cont-init.d /etc/s6-overlay/s6-rc.d); do \
|
||||
sed -i 's/bash/bashio/g' "$file" && \
|
||||
sed -i 's/{PUID:-911}/(bashio::config "PUID")/g' "$file" && \
|
||||
sed -i 's/{PGID:-911}/(bashio::config "PGID")/g' "$file"; done
|
||||
&& for file in $(grep -srl "PUID:-911" /etc/cont-init.d /etc/s6-overlay/s6-rc.d); do sed -i 's/bash/bashio/g' "$file" && sed -i 's/{PUID:-911}/(bashio::config "PUID")/g' "$file" && sed -i 's/{PGID:-911}/(bashio::config "PGID")/g' "$file"; done \
|
||||
\
|
||||
# Correct config location
|
||||
&& for file in $(grep -sril '/config[ /$]' /defaults /etc/cont-init.d /etc/services.d /etc/s6-overlay/s6-rc.d); do sed -i "s=/config=$CONFIGLOCATION=g" "$file"; done \
|
||||
\
|
||||
# Avoid changing /config permissions
|
||||
&& for file in $(grep -srl "chown abc:abc \/config" /etc/cont-init.d /etc/s6-overlay/s6-rc.d); do sed -i "/chown abc:abc \/config/d" "$file"; done
|
||||
|
||||
##################
|
||||
# 3 Install apps #
|
||||
|
||||
@@ -27,28 +27,24 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \
|
||||
S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0 \
|
||||
S6_SERVICES_GRACETIME=0
|
||||
|
||||
ENV PAPERLESS_DATA_DIR=/config/addons_config/paperless_ng
|
||||
# spellcheck disable=SC2015
|
||||
# hadolint ignore=DL4006,SC2013
|
||||
# Global LSIO modifications
|
||||
ARG CONFIGLOCATION="/config/addons_config/paperless_ng"
|
||||
# hadolint ignore=SC2015, SC2013
|
||||
RUN \
|
||||
#################
|
||||
# Correct image #
|
||||
#################
|
||||
# Avoid custom-init.d duplications
|
||||
grep -sril "Potential tampering with custom" /etc/cont-init.d /etc/s6-overlay/s6-rc.d | xargs -r rm \
|
||||
for file in $(grep -sril 'Potential tampering with custom' /etc/cont-init.d /etc/services.d /etc/s6-overlay/s6-rc.d); do rm -f "$file"; done \
|
||||
\
|
||||
# Prevent changing ownership of /config
|
||||
#&& grep -sril "/config" /etc/cont-init.d /etc/s6-overlay/s6-rc.d | xargs grep -riL "/config/" | xargs -r rm \
|
||||
&& if [ -f /etc/cont-init.d/10-adduser ]; then sed -i "/chown abc:abc \/config$/d" /etc/cont-init.d/10-adduser; fi \
|
||||
# Create new config folder if needed
|
||||
&& for file in $(grep -srl "PUID:-911" /etc/cont-init.d /etc/s6-overlay/s6-rc.d); do sed -i "1a mkdir -p $CONFIGLOCATION" "$file"; done \
|
||||
\
|
||||
# Allow UID and GID setting
|
||||
&& for file in $(grep -srl "PUID:-911" /etc/cont-init.d /etc/s6-overlay/s6-rc.d); do \
|
||||
sed -i 's/bash/bashio/g' "$file" && \
|
||||
sed -i 's/{PUID:-911}/(bashio::config "PUID")/g' "$file" && \
|
||||
sed -i 's/{PGID:-911}/(bashio::config "PGID")/g' "$file"; done \
|
||||
# Change config location
|
||||
&& sed -i "s|/config|$PAPERLESS_DATA_DIR|g" /etc/cont-init.d/10-adduser \
|
||||
&& sed -i "s|/config|$PAPERLESS_DATA_DIR|g" /etc/cont-init.d/50-config
|
||||
&& for file in $(grep -srl "PUID:-911" /etc/cont-init.d /etc/s6-overlay/s6-rc.d); do sed -i 's/bash/bashio/g' "$file" && sed -i 's/{PUID:-911}/(bashio::config "PUID")/g' "$file" && sed -i 's/{PGID:-911}/(bashio::config "PGID")/g' "$file"; done \
|
||||
\
|
||||
# Correct config location
|
||||
&& for file in $(grep -sril '/config[ /$]' /defaults /etc/cont-init.d /etc/services.d /etc/s6-overlay/s6-rc.d); do sed -i "s=/config=$CONFIGLOCATION=g" "$file"; done \
|
||||
\
|
||||
# Avoid changing /config permissions
|
||||
&& for file in $(grep -srl "chown abc:abc \/config" /etc/cont-init.d /etc/s6-overlay/s6-rc.d); do sed -i "/chown abc:abc \/config/d" "$file"; done
|
||||
|
||||
##################
|
||||
# 3 Install apps #
|
||||
|
||||
@@ -27,25 +27,32 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \
|
||||
S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0 \
|
||||
S6_SERVICES_GRACETIME=0
|
||||
|
||||
# hadolint ignore=SC2015,DL4006,SC2013
|
||||
# Image specific
|
||||
RUN \
|
||||
# Avoid custom-init.d duplications
|
||||
grep -sril "Potential tampering with custom" /etc/cont-init.d /etc/s6-overlay/s6-rc.d | xargs -r rm \
|
||||
\
|
||||
# Prevent changing ownership of /config
|
||||
#&& grep -sril "/config" /etc/cont-init.d /etc/s6-overlay/s6-rc.d | xargs grep -riL "/config/" | xargs -r rm \
|
||||
&& if [ -f /etc/cont-init.d/10-adduser ]; then sed -i "/chown abc:abc \/config$/d" /etc/cont-init.d/10-adduser; fi \
|
||||
\
|
||||
# Allow UID and GID setting
|
||||
&& for file in $(grep -srl "PUID:-911" /etc/cont-init.d /etc/s6-overlay/s6-rc.d); do \
|
||||
sed -i 's/bash/bashio/g' "$file" && \
|
||||
sed -i 's/{PUID:-911}/(bashio::config "PUID")/g' "$file" && \
|
||||
sed -i 's/{PGID:-911}/(bashio::config "PGID")/g' "$file"; done \
|
||||
# Change config path
|
||||
&& sed -i 's|papermerge/config|papermerge/confi|g' /etc/cont-init.d/* \
|
||||
sed -i 's|papermerge/config|papermerge/confi|g' /etc/cont-init.d/* \
|
||||
&& sed -i 's|/config|/data/config|g' /etc/cont-init.d/* \
|
||||
&& sed -i 's|papermerge/confi|papermerge/config|g' /etc/cont-init.d/*
|
||||
|
||||
# Global LSIO modifications
|
||||
ARG CONFIGLOCATION="/config"
|
||||
# hadolint ignore=SC2015, SC2013
|
||||
RUN \
|
||||
# Avoid custom-init.d duplications
|
||||
for file in $(grep -sril 'Potential tampering with custom' /etc/cont-init.d /etc/services.d /etc/s6-overlay/s6-rc.d); do rm -f "$file"; done \
|
||||
\
|
||||
# Create new config folder if needed
|
||||
&& for file in $(grep -srl "PUID:-911" /etc/cont-init.d /etc/s6-overlay/s6-rc.d); do sed -i "1a mkdir -p $CONFIGLOCATION" "$file"; done \
|
||||
\
|
||||
# Allow UID and GID setting
|
||||
&& for file in $(grep -srl "PUID:-911" /etc/cont-init.d /etc/s6-overlay/s6-rc.d); do sed -i 's/bash/bashio/g' "$file" && sed -i 's/{PUID:-911}/(bashio::config "PUID")/g' "$file" && sed -i 's/{PGID:-911}/(bashio::config "PGID")/g' "$file"; done \
|
||||
\
|
||||
# Correct config location
|
||||
&& for file in $(grep -sril '/config[ /$]' /defaults /etc/cont-init.d /etc/services.d /etc/s6-overlay/s6-rc.d); do sed -i "s=/config=$CONFIGLOCATION=g" "$file"; done \
|
||||
\
|
||||
# Avoid changing /config permissions
|
||||
&& for file in $(grep -srl "chown abc:abc \/config" /etc/cont-init.d /etc/s6-overlay/s6-rc.d); do sed -i "/chown abc:abc \/config/d" "$file"; done
|
||||
|
||||
##################
|
||||
# 3 Install apps #
|
||||
##################
|
||||
|
||||
@@ -27,21 +27,24 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \
|
||||
S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0 \
|
||||
S6_SERVICES_GRACETIME=0
|
||||
|
||||
# hadolint ignore=SC2015,DL4006,SC2013
|
||||
# Global LSIO modifications
|
||||
ARG CONFIGLOCATION="/config"
|
||||
# hadolint ignore=SC2015, SC2013
|
||||
RUN \
|
||||
# Avoid custom-init.d duplications
|
||||
grep -sril "Potential tampering with custom" /etc/cont-init.d /etc/s6-overlay/s6-rc.d | xargs -r rm \
|
||||
for file in $(grep -sril 'Potential tampering with custom' /etc/cont-init.d /etc/services.d /etc/s6-overlay/s6-rc.d); do rm -f "$file"; done \
|
||||
\
|
||||
# Prevent changing ownership of /config
|
||||
#&& grep -sril "/config" /etc/cont-init.d /etc/s6-overlay/s6-rc.d | xargs grep -riL "/config/" | xargs -r rm \
|
||||
&& if [ -f /etc/cont-init.d/10-adduser ]; then sed -i "/chown abc:abc \/config$/d" /etc/cont-init.d/10-adduser; fi \
|
||||
# Create new config folder if needed
|
||||
&& for file in $(grep -srl "PUID:-911" /etc/cont-init.d /etc/s6-overlay/s6-rc.d); do sed -i "1a mkdir -p $CONFIGLOCATION" "$file"; done \
|
||||
\
|
||||
# Allow UID and GID setting
|
||||
&& for file in $(grep -srl "PUID:-911" /etc/cont-init.d /etc/s6-overlay/s6-rc.d); do \
|
||||
sed -i 's/bash/bashio/g' "$file" && \
|
||||
sed -i 's/{PUID:-911}/(bashio::config "PUID")/g' "$file" && \
|
||||
sed -i 's/{PGID:-911}/(bashio::config "PGID")/g' "$file"; done
|
||||
|
||||
&& for file in $(grep -srl "PUID:-911" /etc/cont-init.d /etc/s6-overlay/s6-rc.d); do sed -i 's/bash/bashio/g' "$file" && sed -i 's/{PUID:-911}/(bashio::config "PUID")/g' "$file" && sed -i 's/{PGID:-911}/(bashio::config "PGID")/g' "$file"; done \
|
||||
\
|
||||
# Correct config location
|
||||
&& for file in $(grep -sril '/config[ /$]' /defaults /etc/cont-init.d /etc/services.d /etc/s6-overlay/s6-rc.d); do sed -i "s=/config=$CONFIGLOCATION=g" "$file"; done \
|
||||
\
|
||||
# Avoid changing /config permissions
|
||||
&& for file in $(grep -srl "chown abc:abc \/config" /etc/cont-init.d /etc/s6-overlay/s6-rc.d); do sed -i "/chown abc:abc \/config/d" "$file"; done
|
||||
|
||||
##################
|
||||
# 3 Install apps #
|
||||
|
||||
@@ -29,29 +29,30 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \
|
||||
|
||||
ENV HOME=/config/addons_config/plex-data-manager
|
||||
|
||||
# hadolint ignore=SC2015,DL4006,SC2013
|
||||
# Image specific modifications
|
||||
RUN \
|
||||
# use /data instead of /config for hass.io environment
|
||||
sed -i "s|/config|/config/addons_config/plex-meta-manager|g" /etc/services.d/*/run \
|
||||
&& sed -i "s|/config|/config/addons_config/plex-meta-manager|g" /etc/cont-init.d/* \
|
||||
\
|
||||
# Avoid custom-init.d duplications
|
||||
&& grep -sril "Potential tampering with custom" /etc/cont-init.d /etc/s6-overlay/s6-rc.d | xargs -r rm \
|
||||
\
|
||||
# Prevent changing ownership of /config
|
||||
#&& grep -sril "/config" /etc/cont-init.d /etc/s6-overlay/s6-rc.d | xargs grep -riL "/config/" | xargs -r rm \
|
||||
&& if [ -f /etc/cont-init.d/10-adduser ]; then sed -i "/chown abc:abc \/config$/d" /etc/cont-init.d/10-adduser; fi \
|
||||
\
|
||||
# Allow UID and GID setting
|
||||
&& for file in $(grep -srl "PUID:-911" /etc/cont-init.d /etc/s6-overlay/s6-rc.d); do \
|
||||
sed -i 's/bash/bashio/g' "$file" && \
|
||||
sed -i 's/{PUID:-911}/(bashio::config "PUID")/g' "$file" && \
|
||||
sed -i 's/{PGID:-911}/(bashio::config "PGID")/g' "$file"; done \
|
||||
\
|
||||
# Add template config.yaml
|
||||
&& mkdir /templates \
|
||||
mkdir /templates \
|
||||
&& curl -f -L -s -S "https://github.com/meisnate12/Plex-Meta-Manager/blob/master/config/config.yml.template" -o /templates/config.yml
|
||||
|
||||
# Global LSIO modifications
|
||||
ARG CONFIGLOCATION="/config/addons_config/plex-meta-manager"
|
||||
# hadolint ignore=SC2015, SC2013
|
||||
RUN \
|
||||
# Avoid custom-init.d duplications
|
||||
for file in $(grep -sril 'Potential tampering with custom' /etc/cont-init.d /etc/services.d /etc/s6-overlay/s6-rc.d); do rm -f "$file"; done \
|
||||
\
|
||||
# Create new config folder if needed
|
||||
&& for file in $(grep -srl "PUID:-911" /etc/cont-init.d /etc/s6-overlay/s6-rc.d); do sed -i "1a mkdir -p $CONFIGLOCATION" "$file"; done \
|
||||
\
|
||||
# Allow UID and GID setting
|
||||
&& for file in $(grep -srl "PUID:-911" /etc/cont-init.d /etc/s6-overlay/s6-rc.d); do sed -i 's/bash/bashio/g' "$file" && sed -i 's/{PUID:-911}/(bashio::config "PUID")/g' "$file" && sed -i 's/{PGID:-911}/(bashio::config "PGID")/g' "$file"; done \
|
||||
\
|
||||
# Correct config location
|
||||
&& for file in $(grep -sril '/config[ /$]' /defaults /etc/cont-init.d /etc/services.d /etc/s6-overlay/s6-rc.d); do sed -i "s=/config=$CONFIGLOCATION=g" "$file"; done \
|
||||
\
|
||||
# Avoid changing /config permissions
|
||||
&& for file in $(grep -srl "chown abc:abc \/config" /etc/cont-init.d /etc/s6-overlay/s6-rc.d); do sed -i "/chown abc:abc \/config/d" "$file"; done
|
||||
|
||||
##################
|
||||
# 3 Install apps #
|
||||
|
||||
@@ -27,21 +27,24 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \
|
||||
S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0 \
|
||||
S6_SERVICES_GRACETIME=0
|
||||
|
||||
# GLOBAL LSIO MODIFICATIONS
|
||||
# Global LSIO modifications
|
||||
ARG CONFIGLOCATION="/config/addons_config/prowlarr"
|
||||
# hadolint ignore=SC2015,DL4006,SC2013
|
||||
# hadolint ignore=SC2015, SC2013
|
||||
RUN \
|
||||
# Avoid custom-init.d duplications
|
||||
rm -f $(grep -sril "Potential tampering with custom" /etc/cont-init.d /etc/s6-overlay/s6-rc.d) \
|
||||
for file in $(grep -sril 'Potential tampering with custom' /etc/cont-init.d /etc/services.d /etc/s6-overlay/s6-rc.d); do rm -f "$file"; done \
|
||||
\
|
||||
# change config folder
|
||||
&& sed -i "s=/config=$CONFIGLOCATION || true=g" $(grep -sril '/config[ /$]' /etc/cont-init.d /etc/services.d /etc/s6-overlay/s6-rc.d) \
|
||||
# Create new config folder if needed
|
||||
&& for file in $(grep -srl "PUID:-911" /etc/cont-init.d /etc/s6-overlay/s6-rc.d); do sed -i "1a mkdir -p $CONFIGLOCATION" "$file"; done \
|
||||
\
|
||||
# Allow UID and GID setting
|
||||
&& for file in $(grep -srl "PUID:-911" /etc/cont-init.d /etc/s6-overlay/s6-rc.d); do \
|
||||
sed -i 's/bash/bashio/g' "$file" && \
|
||||
sed -i 's/{PUID:-911}/(bashio::config "PUID")/g' "$file" && \
|
||||
sed -i 's/{PGID:-911}/(bashio::config "PGID")/g' "$file"; done
|
||||
&& for file in $(grep -srl "PUID:-911" /etc/cont-init.d /etc/s6-overlay/s6-rc.d); do sed -i 's/bash/bashio/g' "$file" && sed -i 's/{PUID:-911}/(bashio::config "PUID")/g' "$file" && sed -i 's/{PGID:-911}/(bashio::config "PGID")/g' "$file"; done \
|
||||
\
|
||||
# Correct config location
|
||||
&& for file in $(grep -sril '/config[ /$]' /defaults /etc/cont-init.d /etc/services.d /etc/s6-overlay/s6-rc.d); do sed -i "s=/config=$CONFIGLOCATION=g" "$file"; done \
|
||||
\
|
||||
# Avoid changing /config permissions
|
||||
&& for file in $(grep -srl "chown abc:abc \/config" /etc/cont-init.d /etc/s6-overlay/s6-rc.d); do sed -i "/chown abc:abc \/config/d" "$file"; done
|
||||
|
||||
##################
|
||||
# 3 Install apps #
|
||||
|
||||
@@ -27,25 +27,24 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \
|
||||
S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0 \
|
||||
S6_SERVICES_GRACETIME=0
|
||||
|
||||
# hadolint ignore=SC2015,DL4006,SC2013
|
||||
# Global LSIO modifications
|
||||
ARG CONFIGLOCATION="/config/addons_config/radarr"
|
||||
# hadolint ignore=SC2015, SC2013
|
||||
RUN \
|
||||
# use /data instead of /config for hass.io environment
|
||||
sed -i "s|/config|/config/addons_config/radarr|g" /etc/services.d/radarr/run \
|
||||
&& sed -i "s|/config|/config/addons_config/radarr|g" /etc/cont-init.d/30-config \
|
||||
\
|
||||
# Avoid custom-init.d duplications
|
||||
&& grep -sril "Potential tampering with custom" /etc/cont-init.d /etc/s6-overlay/s6-rc.d | xargs -r rm \
|
||||
for file in $(grep -sril 'Potential tampering with custom' /etc/cont-init.d /etc/services.d /etc/s6-overlay/s6-rc.d); do rm -f "$file"; done \
|
||||
\
|
||||
# Prevent changing ownership of /config
|
||||
#&& grep -sril "/config" /etc/cont-init.d /etc/s6-overlay/s6-rc.d | xargs grep -riL "/config/" | xargs -r rm \
|
||||
&& if [ -f /etc/cont-init.d/10-adduser ]; then sed -i "/chown abc:abc \/config$/d" /etc/cont-init.d/10-adduser; fi \
|
||||
# Create new config folder if needed
|
||||
&& for file in $(grep -srl "PUID:-911" /etc/cont-init.d /etc/s6-overlay/s6-rc.d); do sed -i "1a mkdir -p $CONFIGLOCATION" "$file"; done \
|
||||
\
|
||||
# Allow UID and GID setting
|
||||
&& for file in $(grep -srl "PUID:-911" /etc/cont-init.d /etc/s6-overlay/s6-rc.d); do \
|
||||
sed -i 's/bash/bashio/g' "$file" && \
|
||||
sed -i 's/{PUID:-911}/(bashio::config "PUID")/g' "$file" && \
|
||||
sed -i 's/{PGID:-911}/(bashio::config "PGID")/g' "$file"; done
|
||||
|
||||
&& for file in $(grep -srl "PUID:-911" /etc/cont-init.d /etc/s6-overlay/s6-rc.d); do sed -i 's/bash/bashio/g' "$file" && sed -i 's/{PUID:-911}/(bashio::config "PUID")/g' "$file" && sed -i 's/{PGID:-911}/(bashio::config "PGID")/g' "$file"; done \
|
||||
\
|
||||
# Correct config location
|
||||
&& for file in $(grep -sril '/config[ /$]' /defaults /etc/cont-init.d /etc/services.d /etc/s6-overlay/s6-rc.d); do sed -i "s=/config=$CONFIGLOCATION=g" "$file"; done \
|
||||
\
|
||||
# Avoid changing /config permissions
|
||||
&& for file in $(grep -srl "chown abc:abc \/config" /etc/cont-init.d /etc/s6-overlay/s6-rc.d); do sed -i "/chown abc:abc \/config/d" "$file"; done
|
||||
|
||||
##################
|
||||
# 3 Install apps #
|
||||
|
||||
@@ -28,22 +28,24 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \
|
||||
S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0 \
|
||||
S6_SERVICES_GRACETIME=0
|
||||
|
||||
# hadolint ignore=SC2015,DL4006,SC2013
|
||||
RUN sed -i "s|/config|/config/addons_config/readarr|g" /etc/services.d/readarr/run \
|
||||
&& sed -i "s|/config|/config/addons_config/readarr|g" /etc/cont-init.d/30-config \
|
||||
\
|
||||
# Global LSIO modifications
|
||||
ARG CONFIGLOCATION="/config/addons_config/readarr"
|
||||
# hadolint ignore=SC2015, SC2013
|
||||
RUN \
|
||||
# Avoid custom-init.d duplications
|
||||
&& grep -sril "Potential tampering with custom" /etc/cont-init.d /etc/s6-overlay/s6-rc.d | xargs -r rm \
|
||||
for file in $(grep -sril 'Potential tampering with custom' /etc/cont-init.d /etc/services.d /etc/s6-overlay/s6-rc.d); do rm -f "$file"; done \
|
||||
\
|
||||
# Prevent changing ownership of /config
|
||||
#&& grep -sril "/config" /etc/cont-init.d /etc/s6-overlay/s6-rc.d | xargs grep -riL "/config/" | xargs -r rm \
|
||||
&& if [ -f /etc/cont-init.d/10-adduser ]; then sed -i "/chown abc:abc \/config$/d" /etc/cont-init.d/10-adduser; fi \
|
||||
# Create new config folder if needed
|
||||
&& for file in $(grep -srl "PUID:-911" /etc/cont-init.d /etc/s6-overlay/s6-rc.d); do sed -i "1a mkdir -p $CONFIGLOCATION" "$file"; done \
|
||||
\
|
||||
# Allow UID and GID setting
|
||||
&& for file in $(grep -srl "PUID:-911" /etc/cont-init.d /etc/s6-overlay/s6-rc.d); do \
|
||||
sed -i 's/bash/bashio/g' "$file" && \
|
||||
sed -i 's/{PUID:-911}/(bashio::config "PUID")/g' "$file" && \
|
||||
sed -i 's/{PGID:-911}/(bashio::config "PGID")/g' "$file"; done
|
||||
&& for file in $(grep -srl "PUID:-911" /etc/cont-init.d /etc/s6-overlay/s6-rc.d); do sed -i 's/bash/bashio/g' "$file" && sed -i 's/{PUID:-911}/(bashio::config "PUID")/g' "$file" && sed -i 's/{PGID:-911}/(bashio::config "PGID")/g' "$file"; done \
|
||||
\
|
||||
# Correct config location
|
||||
&& for file in $(grep -sril '/config[ /$]' /defaults /etc/cont-init.d /etc/services.d /etc/s6-overlay/s6-rc.d); do sed -i "s=/config=$CONFIGLOCATION=g" "$file"; done \
|
||||
\
|
||||
# Avoid changing /config permissions
|
||||
&& for file in $(grep -srl "chown abc:abc \/config" /etc/cont-init.d /etc/s6-overlay/s6-rc.d); do sed -i "/chown abc:abc \/config/d" "$file"; done
|
||||
|
||||
##################
|
||||
# 3 Install apps #
|
||||
|
||||
@@ -27,23 +27,24 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \
|
||||
S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0 \
|
||||
S6_SERVICES_GRACETIME=0
|
||||
|
||||
# hadolint ignore=SC2015,DL4006,SC2013
|
||||
# Global LSIO modifications
|
||||
ARG CONFIGLOCATION="/data"
|
||||
# hadolint ignore=SC2015, SC2013
|
||||
RUN \
|
||||
# use /data instead of /config for hass.io environment
|
||||
sed -i 's|/config \\|/data \\|g' /etc/cont-init.d/30-config \
|
||||
\
|
||||
# Avoid custom-init.d duplications
|
||||
&& grep -sril "Potential tampering with custom" /etc/cont-init.d /etc/s6-overlay/s6-rc.d | xargs -r rm \
|
||||
for file in $(grep -sril 'Potential tampering with custom' /etc/cont-init.d /etc/services.d /etc/s6-overlay/s6-rc.d); do rm -f "$file"; done \
|
||||
\
|
||||
# Prevent changing ownership of /config
|
||||
#&& grep -sril "/config" /etc/cont-init.d /etc/s6-overlay/s6-rc.d | xargs grep -riL "/config/" | xargs -r rm \
|
||||
&& if [ -f /etc/cont-init.d/10-adduser ]; then sed -i "/chown abc:abc \/config$/d" /etc/cont-init.d/10-adduser; fi \
|
||||
# Create new config folder if needed
|
||||
&& for file in $(grep -srl "PUID:-911" /etc/cont-init.d /etc/s6-overlay/s6-rc.d); do sed -i "1a mkdir -p $CONFIGLOCATION" "$file"; done \
|
||||
\
|
||||
# Allow UID and GID setting
|
||||
&& for file in $(grep -srl "PUID:-911" /etc/cont-init.d /etc/s6-overlay/s6-rc.d); do \
|
||||
sed -i 's/bash/bashio/g' "$file" && \
|
||||
sed -i 's/{PUID:-911}/(bashio::config "PUID")/g' "$file" && \
|
||||
sed -i 's/{PGID:-911}/(bashio::config "PGID")/g' "$file"; done
|
||||
&& for file in $(grep -srl "PUID:-911" /etc/cont-init.d /etc/s6-overlay/s6-rc.d); do sed -i 's/bash/bashio/g' "$file" && sed -i 's/{PUID:-911}/(bashio::config "PUID")/g' "$file" && sed -i 's/{PGID:-911}/(bashio::config "PGID")/g' "$file"; done \
|
||||
\
|
||||
# Correct config location
|
||||
&& for file in $(grep -sril '/config[ /$]' /defaults /etc/cont-init.d /etc/services.d /etc/s6-overlay/s6-rc.d); do sed -i "s=/config=$CONFIGLOCATION=g" "$file"; done \
|
||||
\
|
||||
# Avoid changing /config permissions
|
||||
&& for file in $(grep -srl "chown abc:abc \/config" /etc/cont-init.d /etc/s6-overlay/s6-rc.d); do sed -i "/chown abc:abc \/config/d" "$file"; done
|
||||
|
||||
##################
|
||||
# 3 Install apps #
|
||||
|
||||
@@ -30,35 +30,32 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \
|
||||
|
||||
# hadolint ignore=SC2015,DL4006,SC2013
|
||||
RUN \
|
||||
###############
|
||||
# Adapt image #
|
||||
###############
|
||||
# Avoid custom-init.d duplications
|
||||
grep -sril "Potential tampering with custom" /etc/cont-init.d /etc/s6-overlay/s6-rc.d | xargs -r rm \
|
||||
\
|
||||
# Prevent changing ownership of /config
|
||||
#&& grep -sril "/config" /etc/cont-init.d /etc/s6-overlay/s6-rc.d | xargs grep -riL "/config/" | xargs -r rm \
|
||||
&& if [ -f /etc/cont-init.d/10-adduser ]; then sed -i "/chown abc:abc \/config$/d" /etc/cont-init.d/10-adduser; fi \
|
||||
\
|
||||
# Allow UID and GID setting
|
||||
&& for file in $(grep -srl "PUID:-911" /etc/cont-init.d /etc/s6-overlay/s6-rc.d); do \
|
||||
sed -i 's/bash/bashio/g' "$file" && \
|
||||
sed -i 's/{PUID:-911}/(bashio::config "PUID")/g' "$file" && \
|
||||
sed -i 's/{PGID:-911}/(bashio::config "PGID")/g' "$file"; done \
|
||||
\
|
||||
# Correct config folder
|
||||
&& grep -rl " /config" /etc/cont-init.d | xargs sed -i 's| /config| /share/resiliosync_config|g' || true \
|
||||
&& grep -rl " /config" /etc/services.d | xargs sed -i 's| /config| /share/resiliosync_config|g' || true \
|
||||
&& sed -i 's=/config/resiliosync=/share/resiliosync_config || true=g' /etc/cont-init.d/10-adduser || true \
|
||||
&& sed -i 's="/config="/share/resiliosync_config=g' /defaults/* \
|
||||
\
|
||||
# Correct sync folder
|
||||
&& grep -rl "/sync/" /etc/cont-init.d | xargs sed -i 's|/sync/|/share/resiliosync|g' || true \
|
||||
grep -rl "/sync/" /etc/cont-init.d | xargs sed -i 's|/sync/|/share/resiliosync|g' || true \
|
||||
&& grep -rl " /sync" /etc/cont-init.d | xargs sed -i 's| /sync| /share/resiliosync|g' || true \
|
||||
&& grep -rl "/sync/" /etc/services.d | xargs sed -i 's|/sync/|/share/resiliosync|g' || true \
|
||||
&& grep -rl " /sync" /etc/services.d | xargs sed -i 's| /sync| /share/resiliosync|g' || true \
|
||||
&& sed -i 's=/sync/=/share/resiliosync/=g' /defaults/*
|
||||
|
||||
# Global LSIO modifications
|
||||
ARG CONFIGLOCATION="/share/resiliosync_config"
|
||||
# hadolint ignore=SC2015, SC2013
|
||||
RUN \
|
||||
# Avoid custom-init.d duplications
|
||||
for file in $(grep -sril 'Potential tampering with custom' /etc/cont-init.d /etc/services.d /etc/s6-overlay/s6-rc.d); do rm -f "$file"; done \
|
||||
\
|
||||
# Create new config folder if needed
|
||||
&& for file in $(grep -srl "PUID:-911" /etc/cont-init.d /etc/s6-overlay/s6-rc.d); do sed -i "1a mkdir -p $CONFIGLOCATION" "$file"; done \
|
||||
\
|
||||
# Allow UID and GID setting
|
||||
&& for file in $(grep -srl "PUID:-911" /etc/cont-init.d /etc/s6-overlay/s6-rc.d); do sed -i 's/bash/bashio/g' "$file" && sed -i 's/{PUID:-911}/(bashio::config "PUID")/g' "$file" && sed -i 's/{PGID:-911}/(bashio::config "PGID")/g' "$file"; done \
|
||||
\
|
||||
# Correct config location
|
||||
&& for file in $(grep -sril '/config[ /$]' /defaults /etc/cont-init.d /etc/services.d /etc/s6-overlay/s6-rc.d); do sed -i "s=/config=$CONFIGLOCATION=g" "$file"; done \
|
||||
\
|
||||
# Avoid changing /config permissions
|
||||
&& for file in $(grep -srl "chown abc:abc \/config" /etc/cont-init.d /etc/s6-overlay/s6-rc.d); do sed -i "/chown abc:abc \/config/d" "$file"; done
|
||||
|
||||
##################
|
||||
# 3 Install apps #
|
||||
##################
|
||||
|
||||
@@ -27,22 +27,24 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \
|
||||
S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0 \
|
||||
S6_SERVICES_GRACETIME=0
|
||||
|
||||
# MOFIFY DATA PATH
|
||||
# hadolint ignore=SC2015,DL4006,SC2013
|
||||
RUN sed -i "s|config|config/transmission|g" /etc/services.d/transmission/run \
|
||||
#&& sed -i "s|config|config/transmission|g" /etc/cont-init.d/20-config \
|
||||
# Global LSIO modifications
|
||||
ARG CONFIGLOCATION="/config/addons_config/transmission"
|
||||
# hadolint ignore=SC2015, SC2013
|
||||
RUN \
|
||||
# Avoid custom-init.d duplications
|
||||
&& grep -sril "Potential tampering with custom" /etc/cont-init.d /etc/s6-overlay/s6-rc.d | xargs -r rm \
|
||||
for file in $(grep -sril 'Potential tampering with custom' /etc/cont-init.d /etc/services.d /etc/s6-overlay/s6-rc.d); do rm -f "$file"; done \
|
||||
\
|
||||
# Prevent changing ownership of /config
|
||||
#&& grep -sril "/config" /etc/cont-init.d /etc/s6-overlay/s6-rc.d | xargs grep -riL "/config/" | xargs -r rm \
|
||||
&& if [ -f /etc/cont-init.d/10-adduser ]; then sed -i "/chown abc:abc \/config$/d" /etc/cont-init.d/10-adduser; fi \
|
||||
# Create new config folder if needed
|
||||
&& for file in $(grep -srl "PUID:-911" /etc/cont-init.d /etc/s6-overlay/s6-rc.d); do sed -i "1a mkdir -p $CONFIGLOCATION" "$file"; done \
|
||||
\
|
||||
# Allow UID and GID setting
|
||||
&& for file in $(grep -srl "PUID:-911" /etc/cont-init.d /etc/s6-overlay/s6-rc.d); do \
|
||||
sed -i 's/bash/bashio/g' "$file" && \
|
||||
sed -i 's/{PUID:-911}/(bashio::config "PUID")/g' "$file" && \
|
||||
sed -i 's/{PGID:-911}/(bashio::config "PGID")/g' "$file"; done
|
||||
&& for file in $(grep -srl "PUID:-911" /etc/cont-init.d /etc/s6-overlay/s6-rc.d); do sed -i 's/bash/bashio/g' "$file" && sed -i 's/{PUID:-911}/(bashio::config "PUID")/g' "$file" && sed -i 's/{PGID:-911}/(bashio::config "PGID")/g' "$file"; done \
|
||||
\
|
||||
# Correct config location
|
||||
&& for file in $(grep -sril '/config[ /$]' /defaults /etc/cont-init.d /etc/services.d /etc/s6-overlay/s6-rc.d); do sed -i "s=/config=$CONFIGLOCATION=g" "$file"; done \
|
||||
\
|
||||
# Avoid changing /config permissions
|
||||
&& for file in $(grep -srl "chown abc:abc \/config" /etc/cont-init.d /etc/s6-overlay/s6-rc.d); do sed -i "/chown abc:abc \/config/d" "$file"; done
|
||||
|
||||
##################
|
||||
# 3 Install apps #
|
||||
|
||||
@@ -29,22 +29,33 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \
|
||||
S6_SERVICES_GRACETIME=0
|
||||
|
||||
RUN \
|
||||
# Set config directory
|
||||
sed -i 's|config|config/addons_config/ubooquity|g' /etc/cont-init.d/10-adduser \
|
||||
&& sed -i 's|config|config/addons_config/ubooquity|g' /etc/cont-init.d/30-config \
|
||||
&& sed -i 's|config|config/addons_config/ubooquity|g' /etc/services.d/ubooquity/run \
|
||||
# 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 \
|
||||
# Set default directory
|
||||
&& sed -i 's|/files|/share/ubooquity/files|g' /defaults/preferences.json \
|
||||
sed -i 's|/files|/share/ubooquity/files|g' /defaults/preferences.json \
|
||||
&& sed -i 's|/comics|/share/ubooquity/comics|g' /defaults/preferences.json \
|
||||
&& sed -i 's|/books|/share/ubooquity/books|g' /defaults/preferences.json \
|
||||
# Allow maximum memory setting
|
||||
&& sed -i 's|bash|bashio|g' /etc/services.d/ubooquity/run \
|
||||
&& sed -i 's|{MAXMEM:-512}|(bashio::config "maxmem")|g' /etc/services.d/ubooquity/run
|
||||
|
||||
# Global LSIO modifications
|
||||
ARG CONFIGLOCATION="/config/addons_config/ubooquity"
|
||||
# hadolint ignore=SC2015, SC2013
|
||||
RUN \
|
||||
# Avoid custom-init.d duplications
|
||||
for file in $(grep -sril 'Potential tampering with custom' /etc/cont-init.d /etc/services.d /etc/s6-overlay/s6-rc.d); do rm -f "$file"; done \
|
||||
\
|
||||
# Create new config folder if needed
|
||||
&& for file in $(grep -srl "PUID:-911" /etc/cont-init.d /etc/s6-overlay/s6-rc.d); do sed -i "1a mkdir -p $CONFIGLOCATION" "$file"; done \
|
||||
\
|
||||
# Allow UID and GID setting
|
||||
&& for file in $(grep -srl "PUID:-911" /etc/cont-init.d /etc/s6-overlay/s6-rc.d); do sed -i 's/bash/bashio/g' "$file" && sed -i 's/{PUID:-911}/(bashio::config "PUID")/g' "$file" && sed -i 's/{PGID:-911}/(bashio::config "PGID")/g' "$file"; done \
|
||||
\
|
||||
# Correct config location
|
||||
&& for file in $(grep -sril '/config[ /$]' /defaults /etc/cont-init.d /etc/services.d /etc/s6-overlay/s6-rc.d); do sed -i "s=/config=$CONFIGLOCATION=g" "$file"; done \
|
||||
\
|
||||
# Avoid changing /config permissions
|
||||
&& for file in $(grep -srl "chown abc:abc \/config" /etc/cont-init.d /etc/s6-overlay/s6-rc.d); do sed -i "/chown abc:abc \/config/d" "$file"; done
|
||||
|
||||
##################
|
||||
# 3 Install apps #
|
||||
##################
|
||||
|
||||
@@ -29,23 +29,9 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \
|
||||
|
||||
# Allow UID and GID setting
|
||||
# hadolint ignore=SC2015,DL4006,SC2013
|
||||
RUN grep -sril "Potential tampering with custom" /etc/cont-init.d /etc/s6-overlay/s6-rc.d | xargs -r rm \
|
||||
\
|
||||
# Prevent changing ownership of /config
|
||||
#&& grep -sril "/config" /etc/cont-init.d /etc/s6-overlay/s6-rc.d | xargs grep -riL "/config/" | xargs -r rm \
|
||||
&& if [ -f /etc/cont-init.d/10-adduser ]; then sed -i "/chown abc:abc \/config$/d" /etc/cont-init.d/10-adduser; fi \
|
||||
\
|
||||
# Allow UID and GID setting
|
||||
&& for file in $(grep -srl "PUID:-911" /etc/cont-init.d /etc/s6-overlay/s6-rc.d); do \
|
||||
sed -i 's/bash/bashio/g' "$file" && \
|
||||
sed -i 's/{PUID:-911}/(bashio::config "PUID")/g' "$file" && \
|
||||
sed -i 's/{PGID:-911}/(bashio::config "PGID")/g' "$file"; done \
|
||||
\
|
||||
RUN \
|
||||
# Change home folder location
|
||||
&& sed -i 's|/config|/share/webtop_kde|g' /defaults/* \
|
||||
&& sed -i 's|/config|/share/webtop_kde|g' /etc/cont-init.d/* \
|
||||
&& sed -i 's|/config|/share/webtop_kde|g' /etc/services.d/*/run \
|
||||
&& usermod --home /share/webtop_kde abc \
|
||||
usermod --home /share/webtop_kde abc \
|
||||
\
|
||||
# Correct error in upstream image
|
||||
&& sed -i 's|startwm |startwm.sh |g' /etc/cont-init.d/30-config \
|
||||
@@ -54,6 +40,25 @@ RUN grep -sril "Potential tampering with custom" /etc/cont-init.d /etc/s6-overla
|
||||
# hadolint ignore=DL3017
|
||||
&& apk upgrade --no-cache
|
||||
|
||||
# Global LSIO modifications
|
||||
ARG CONFIGLOCATION="/share/webtop_kde"
|
||||
# hadolint ignore=SC2015, SC2013
|
||||
RUN \
|
||||
# Avoid custom-init.d duplications
|
||||
for file in $(grep -sril 'Potential tampering with custom' /etc/cont-init.d /etc/services.d /etc/s6-overlay/s6-rc.d); do rm -f "$file"; done \
|
||||
\
|
||||
# Create new config folder if needed
|
||||
&& for file in $(grep -srl "PUID:-911" /etc/cont-init.d /etc/s6-overlay/s6-rc.d); do sed -i "1a mkdir -p $CONFIGLOCATION" "$file"; done \
|
||||
\
|
||||
# Allow UID and GID setting
|
||||
&& for file in $(grep -srl "PUID:-911" /etc/cont-init.d /etc/s6-overlay/s6-rc.d); do sed -i 's/bash/bashio/g' "$file" && sed -i 's/{PUID:-911}/(bashio::config "PUID")/g' "$file" && sed -i 's/{PGID:-911}/(bashio::config "PGID")/g' "$file"; done \
|
||||
\
|
||||
# Correct config location
|
||||
&& for file in $(grep -sril '/config[ /$]' /defaults /etc/cont-init.d /etc/services.d /etc/s6-overlay/s6-rc.d); do sed -i "s=/config=$CONFIGLOCATION=g" "$file"; done \
|
||||
\
|
||||
# Avoid changing /config permissions
|
||||
&& for file in $(grep -srl "chown abc:abc \/config" /etc/cont-init.d /etc/s6-overlay/s6-rc.d); do sed -i "/chown abc:abc \/config/d" "$file"; done
|
||||
|
||||
##################
|
||||
# 3 Install apps #
|
||||
##################
|
||||
|
||||
Reference in New Issue
Block a user