Update Dockerfile

This commit is contained in:
Alexandre
2021-10-22 21:14:49 +02:00
committed by GitHub
parent 31accd78e8
commit 40f7b6d269

View File

@@ -6,6 +6,8 @@ ARG BASHIO_VERSION=0.13.1
# Copy root filesystem
COPY rootfs /
ENV WEBTREES_HOME="/data/webtrees"
RUN \
################
# Install apps #
@@ -30,20 +32,24 @@ RUN \
################
# Modify image #
################
# Change data location
&& cp -n /var/www/webtrees /data \
&& chown -R www-data:www-data /data/webtrees \
&& grep -rl "/var/www/webtrees" /etc/ | xargs sed -i 's|/var/www/webtrees|/data/webtrees|g' \
\
# Use data from addon options for all values
&& sed -i 's|cat \"\$|jq ."|g' /docker-entrypoint.sh \
&& sed -i 's|_FILE" 2> /dev/null| //empty" /data/options.json|g' /docker-entrypoint.sh \
# Remove last line and add copy script
\
# Add entry script
&& chown www-data:www-data /start.sh \
&& chmod a+x /start.sh \
# && sed -i "2 i\cd / && ./start.sh" /docker-entrypoint.sh \
# && chown www-data:www-data /end.sh \
# && chmod a+x /end.sh \
&& sed -i "2 i\cd / && ./start.sh" /docker-entrypoint.sh \
# Add end script
&& chown www-data:www-data /end.sh \
&& chmod a+x /end.sh \
&& sed -i '$ d' /docker-entrypoint.sh \
&& sed -i '$ i\export DB_NAME=$DB_NAME && export WT_USER=$WT_USER && export WT_PASS=$WT_PASS && cd / && ./end.sh' /docker-entrypoint.sh
#
# Add initial script
#VOLUME [ "/data" ]