From e6b8380244e53a095d1f911c457f43119d40daa7 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Fri, 14 Jan 2022 07:26:38 +0100 Subject: [PATCH] Correction --- flexget/Dockerfile | 22 +++++----------------- wger/Dockerfile | 30 ++---------------------------- 2 files changed, 7 insertions(+), 45 deletions(-) diff --git a/flexget/Dockerfile b/flexget/Dockerfile index 72c05f875..7f521e5f3 100644 --- a/flexget/Dockerfile +++ b/flexget/Dockerfile @@ -28,9 +28,9 @@ RUN \ && sed -i 's/{PGID:-911}/(bashio::config "PGID")/g' /etc/cont-init.d/10-adduser \ \ # Correct config folder - && grep -rl " /config" /etc/cont-init.d | xargs sed -i 's| /config| /config/addons_config/flexget|g' \ - && grep -rl " /config" /etc/services.d | xargs sed -i 's| /config| /config/addons_config/flexget|g' \ - && sed -i 's=/config/flexget=/config/addons_config/flexget || true=g' /etc/cont-init.d/10-adduser \ + && grep -rl " /config" /etc/cont-init.d | xargs sed -i 's| /config| /config/flexget|g' \ + && grep -rl " /config" /etc/services.d | xargs sed -i 's| /config| /config/flexget|g' \ + && sed -i 's=/config/flexget=/config/flexget || true=g' /etc/cont-init.d/10-adduser \ \ # Set password && sed -i 's/bash/bashio/g' /etc/cont-init.d/20-config \ @@ -55,19 +55,7 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get curl -L -f -s "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/zzz_templates/automatic_packages.sh" --output /automatic_packages.sh && \ chmod 777 /automatic_packages.sh && \ /automatic_packages.sh "${PACKAGES:-}" && \ - rm /automatic_packages.sh || printf '%s\n' "${PACKAGES:-}" > /ENVFILE] - -# Modules -ARG MODULES="00-banner.sh" - -# Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash); fi && \ -    if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl); fi && \ -    mkdir -p /tmpscripts /etc/cont-init.d && \ -    for scripts in $MODULES; do curl -L -f -s "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/zzz_templates/$scripts" -o /tmpscripts/"$scripts"; done  && \ -    if [ -d /etc/cont-init.d ]; then /bin/cp -rf /tmpscripts/* /etc/cont-init.d/ && chmod -R 755 /etc/cont-init.d; fi && \ -    if [ -d /scripts ]; then /bin/cp -rf /tmpscripts/* /scripts/ && chmod -R 755 /scripts; fi && \ -    rm -rf /tmpscripts || printf '%s\n' "${MODULES:-}" > /MODULESFILE + rm /automatic_packages.sh || printf '%s\n' "${PACKAGES:-}" > /ENVFILE ################ # 4 Entrypoint # @@ -76,7 +64,7 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get #RUN chmod 777 /entrypoint.sh #WORKDIR / #ENTRYPOINT [ "/usr/bin/env" ] -#CMD [ "/entrypoint.sh" ] +#CMD [ "/entrypoint.sh" ] #SHELL ["/bin/bash", "-o", "pipefail", "-c"] ############ diff --git a/wger/Dockerfile b/wger/Dockerfile index 78700b6c0..d1e44041f 100644 --- a/wger/Dockerfile +++ b/wger/Dockerfile @@ -31,32 +31,6 @@ RUN touch /data/database.sqlite \ # 3 Install apps # ################## -# Add rootfs -COPY rootfs/ / - -# Manual apps -ENV PACKAGES="" - -# Automatic apps & bashio -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash); fi && \ - if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl); fi && \ - curl -L -f -s "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/zzz_templates/automatic_packages.sh" --output /automatic_packages.sh && \ - chmod 777 /automatic_packages.sh && \ - /automatic_packages.sh "${PACKAGES:-}" && \ - rm /automatic_packages.sh || printf '%s\n' "${PACKAGES:-}" > /ENVFILE] - -# Modules -ARG MODULES="00-banner.sh" - -# Automatic modules download -RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash); fi && \ -    if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl); fi && \ -    mkdir -p /tmpscripts /etc/cont-init.d && \ -    for scripts in $MODULES; do curl -L -f -s "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/zzz_templates/$scripts" -o /tmpscripts/"$scripts"; done  && \ -    if [ -d /etc/cont-init.d ]; then /bin/cp -rf /tmpscripts/* /etc/cont-init.d/ && chmod -R 755 /etc/cont-init.d; fi && \ -    if [ -d /scripts ]; then /bin/cp -rf /tmpscripts/* /scripts/ && chmod -R 755 /scripts; fi && \ -    rm -rf /tmpscripts || printf '%s\n' "${MODULES:-}" > /MODULESFILE - ################ # 4 Entrypoint # ################ @@ -64,12 +38,12 @@ RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get #RUN chmod 777 /entrypoint.sh #WORKDIR / #ENTRYPOINT [ "/usr/bin/env" ] -#CMD [ "/entrypoint.sh" ] +#CMD [ "/entrypoint.sh" ] #SHELL ["/bin/bash", "-o", "pipefail", "-c"] ############ # 5 Labels # -############ +############ENVFILE ARG BUILD_ARCH ARG BUILD_DATE