mirror of
https://github.com/linuxserver/docker-bookstack.git
synced 2026-02-20 02:30:30 +08:00
overlay-fs bug workaround - move to tmp location then move and chown on init
This commit is contained in:
parent
8361cd993e
commit
63a61cf818
@ -53,6 +53,8 @@ RUN \
|
||||
/var/www/html/ --strip-components=1 && \
|
||||
echo "**** install composer dependencies ****" && \
|
||||
composer install -d /var/www/html/ && \
|
||||
echo "**** overlay-fs bug workaround ****" && \
|
||||
mv /var/www /var/www-tmp && \
|
||||
echo "**** cleanup ****" && \
|
||||
rm -rf \
|
||||
/root/.composer \
|
||||
@ -61,4 +63,4 @@ RUN \
|
||||
COPY root/ /
|
||||
|
||||
VOLUME /config
|
||||
EXPOSE 80
|
||||
EXPOSE 80
|
||||
|
||||
@ -53,6 +53,8 @@ RUN \
|
||||
/var/www/html/ --strip-components=1 && \
|
||||
echo "**** install composer dependencies ****" && \
|
||||
composer install -d /var/www/html/ && \
|
||||
echo "**** overlay-fs bug workaround ****" && \
|
||||
mv /var/www /var/www-tmp && \
|
||||
echo "**** cleanup ****" && \
|
||||
rm -rf \
|
||||
/root/.composer \
|
||||
@ -61,4 +63,4 @@ RUN \
|
||||
COPY root/ /
|
||||
|
||||
VOLUME /config
|
||||
EXPOSE 80
|
||||
EXPOSE 80
|
||||
|
||||
@ -53,6 +53,8 @@ RUN \
|
||||
/var/www/html/ --strip-components=1 && \
|
||||
echo "**** install composer dependencies ****" && \
|
||||
composer install -d /var/www/html/ && \
|
||||
echo "**** overlay-fs bug workaround ****" && \
|
||||
mv /var/www /var/www-tmp && \
|
||||
echo "**** cleanup ****" && \
|
||||
rm -rf \
|
||||
/root/.composer \
|
||||
@ -61,4 +63,4 @@ RUN \
|
||||
COPY root/ /
|
||||
|
||||
VOLUME /config
|
||||
EXPOSE 80
|
||||
EXPOSE 80
|
||||
|
||||
@ -1,5 +1,11 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
if [ -d /var/www-tmp ]; then
|
||||
echo "New container detected. Setting up app folder and fixing permissions."
|
||||
mv /var/www-tmp /var/www
|
||||
chown -R abc:abc /var/www
|
||||
fi
|
||||
|
||||
# create directory structure
|
||||
mkdir -p \
|
||||
/config/www/{uploads,files,images}
|
||||
@ -108,8 +114,5 @@ fi
|
||||
chown -R abc:abc \
|
||||
/config
|
||||
|
||||
find /var/www -print0 | xargs -P "$(nproc)" -I {} -0 chown -h abc:abc {}
|
||||
find /var/www -print0 -type d | xargs -P "$(nproc)" -I {} -0 chown -h abc:abc {}
|
||||
|
||||
# set lockfile to avoid DB waits for this specific container
|
||||
touch /dbwait.lock
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user