Skip to content

overlay-fs bug workaround - move to tmp location then move and chown … #106

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -61,4 +63,4 @@ RUN \
COPY root/ /

VOLUME /config
EXPOSE 80
EXPOSE 80
4 changes: 3 additions & 1 deletion Dockerfile.aarch64
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -61,4 +63,4 @@ RUN \
COPY root/ /

VOLUME /config
EXPOSE 80
EXPOSE 80
4 changes: 3 additions & 1 deletion Dockerfile.armhf
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -61,4 +63,4 @@ RUN \
COPY root/ /

VOLUME /config
EXPOSE 80
EXPOSE 80
9 changes: 6 additions & 3 deletions root/etc/cont-init.d/50-config
Original file line number Diff line number Diff line change
@@ -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}
Expand Down Expand Up @@ -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