Migration to v5.0

https://github.com/alexbelgium/hassio-addons/issues/416
This commit is contained in:
Alexandre
2022-08-26 19:55:26 +02:00
parent 73159492ce
commit e4e7a6ee8d
24 changed files with 262 additions and 261 deletions

View File

@@ -16,8 +16,7 @@
ARG BUILD_FROM
ARG BUILD_VERSION
ARG BUILD_UPSTREAM="8e34ef8d-ls34"
FROM ${BUILD_FROM}${BUILD_UPSTREAM}
FROM ${BUILD_FROM}
##################
# 2 Modify Image #
@@ -28,26 +27,6 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \
S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0 \
S6_SERVICES_GRACETIME=0
# hadolint ignore=DL4006
RUN \
# Avoid custom-init.d duplications
if [ -f /etc/cont-init.d/02-tamper-check ]; then rm /etc/cont-init.d/02-tamper-check; fi \
\
# Prevent changing ownership of /config
&& 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
&& 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 \
# use /data instead of /config for database
&& sed -i 's| /config| /data|g' /defaults/scrutiny.yaml \
&& sed -i 's| /config| /data|g' /etc/cont-init.d/* \
&& sed -i 's| /config| /data|g' /etc/logrotate.d/scrutiny \
&& sed -i 's| /config| /data|g' /etc/crontabs/root \
# correct url paths
&& grep -rl '/web/' /app/scrutiny-web/ | xargs sed -i 's|/web/|./|g'
##################
# 3 Install apps #
##################
@@ -89,8 +68,7 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get
# 4 Entrypoint #
################
# Collector
RUN chmod 777 /run.sh
############
# 5 Labels #