mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-07-08 06:50:58 +02:00
Update Dockerfile
This commit is contained in:
@@ -22,53 +22,22 @@ FROM wger/devel:latest
|
|||||||
##################
|
##################
|
||||||
|
|
||||||
VOLUME [ "/data" ]
|
VOLUME [ "/data" ]
|
||||||
USER root
|
|
||||||
|
|
||||||
RUN touch /data/database.sqlite \
|
RUN sed -i "1a ln -s /data/database.sqlite /home/wger/db" /home/wger/entrypoint.sh \
|
||||||
&& chown wger /data/database.sqlite \
|
&& sed -i "1a ln -s /data/database.sqlite /home/wger/db" /home/wger/entrypoint.sh \
|
||||||
&& ln -s /data/database.sqlite wger/db
|
&& sed -i "1a ln -s touch /data/database.sqlite" /home/wger/entrypoint.sh
|
||||||
|
|
||||||
##################
|
##################
|
||||||
# 3 Install apps #
|
# 3 Install apps #
|
||||||
##################
|
##################
|
||||||
|
|
||||||
# Add rootfs
|
|
||||||
COPY rootfs/ /
|
|
||||||
|
|
||||||
# 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) >/dev/null; 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) >/dev/null; fi \
|
|
||||||
&& mkdir -p /etc/cont-init.d \
|
|
||||||
&& for scripts in $MODULES; do curl -L -f -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" || (echo "script failed to install $scripts" && exit 1); done \
|
|
||||||
&& chmod -R 755 /etc/cont-init.d || printf '%s\n' "${MODULES}" >/MODULESFILE
|
|
||||||
|
|
||||||
# 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) >/dev/null; 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) >/dev/null; fi \
|
|
||||||
&& curl -L -f -s "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/automatic_packages.sh" --output /automatic_packages.sh \
|
|
||||||
&& chmod 777 /automatic_packages.sh \
|
|
||||||
&& eval /./automatic_packages.sh "${PACKAGES:-}" \
|
|
||||||
&& rm /automatic_packages.sh || printf '%s\n' "${PACKAGES:-}" > /ENVFILE
|
|
||||||
|
|
||||||
################
|
################
|
||||||
# 4 Entrypoint #
|
# 4 Entrypoint #
|
||||||
################
|
################
|
||||||
|
|
||||||
#RUN chmod 777 /entrypoint.sh
|
|
||||||
#WORKDIR /
|
|
||||||
#ENTRYPOINT [ "/usr/bin/env" ]
|
|
||||||
#CMD [ "/entrypoint.sh" ]
|
|
||||||
#SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
|
||||||
|
|
||||||
############
|
############
|
||||||
# 5 Labels #
|
# 5 Labels #
|
||||||
############ENVFILE
|
############
|
||||||
|
|
||||||
ARG BUILD_ARCH
|
ARG BUILD_ARCH
|
||||||
ARG BUILD_DATE
|
ARG BUILD_DATE
|
||||||
|
|||||||
Reference in New Issue
Block a user