mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-17 04:49:13 +02:00
Update Dockerfile
This commit is contained in:
@@ -6,6 +6,8 @@ ARG BASHIO_VERSION=0.13.1
|
|||||||
# Copy root filesystem
|
# Copy root filesystem
|
||||||
COPY rootfs /
|
COPY rootfs /
|
||||||
|
|
||||||
|
ENV WEBTREES_HOME="/data/webtrees"
|
||||||
|
|
||||||
RUN \
|
RUN \
|
||||||
################
|
################
|
||||||
# Install apps #
|
# Install apps #
|
||||||
@@ -30,20 +32,24 @@ RUN \
|
|||||||
################
|
################
|
||||||
# Modify image #
|
# 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
|
# Use data from addon options for all values
|
||||||
&& sed -i 's|cat \"\$|jq ."|g' /docker-entrypoint.sh \
|
&& sed -i 's|cat \"\$|jq ."|g' /docker-entrypoint.sh \
|
||||||
&& sed -i 's|_FILE" 2> /dev/null| //empty" /data/options.json|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 \
|
&& chown www-data:www-data /start.sh \
|
||||||
&& chmod a+x /start.sh \
|
&& chmod a+x /start.sh \
|
||||||
# && sed -i "2 i\cd / && ./start.sh" /docker-entrypoint.sh \
|
&& sed -i "2 i\cd / && ./start.sh" /docker-entrypoint.sh \
|
||||||
# && chown www-data:www-data /end.sh \
|
# Add end script
|
||||||
# && chmod a+x /end.sh \
|
&& chown www-data:www-data /end.sh \
|
||||||
|
&& chmod a+x /end.sh \
|
||||||
&& sed -i '$ d' /docker-entrypoint.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
|
&& 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" ]
|
#VOLUME [ "/data" ]
|
||||||
|
|||||||
Reference in New Issue
Block a user