Skip to content

Commit 7f19f97

Browse files
Merge pull request #106 from linuxserver/overlayfs-workaround
overlay-fs bug workaround - move to tmp location then move and chown …
2 parents 8361cd9 + 63a61cf commit 7f19f97

File tree

4 files changed

+15
-6
lines changed

4 files changed

+15
-6
lines changed

Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ RUN \
5353
/var/www/html/ --strip-components=1 && \
5454
echo "**** install composer dependencies ****" && \
5555
composer install -d /var/www/html/ && \
56+
echo "**** overlay-fs bug workaround ****" && \
57+
mv /var/www /var/www-tmp && \
5658
echo "**** cleanup ****" && \
5759
rm -rf \
5860
/root/.composer \
@@ -61,4 +63,4 @@ RUN \
6163
COPY root/ /
6264

6365
VOLUME /config
64-
EXPOSE 80
66+
EXPOSE 80

Dockerfile.aarch64

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ RUN \
5353
/var/www/html/ --strip-components=1 && \
5454
echo "**** install composer dependencies ****" && \
5555
composer install -d /var/www/html/ && \
56+
echo "**** overlay-fs bug workaround ****" && \
57+
mv /var/www /var/www-tmp && \
5658
echo "**** cleanup ****" && \
5759
rm -rf \
5860
/root/.composer \
@@ -61,4 +63,4 @@ RUN \
6163
COPY root/ /
6264

6365
VOLUME /config
64-
EXPOSE 80
66+
EXPOSE 80

Dockerfile.armhf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ RUN \
5353
/var/www/html/ --strip-components=1 && \
5454
echo "**** install composer dependencies ****" && \
5555
composer install -d /var/www/html/ && \
56+
echo "**** overlay-fs bug workaround ****" && \
57+
mv /var/www /var/www-tmp && \
5658
echo "**** cleanup ****" && \
5759
rm -rf \
5860
/root/.composer \
@@ -61,4 +63,4 @@ RUN \
6163
COPY root/ /
6264

6365
VOLUME /config
64-
EXPOSE 80
66+
EXPOSE 80

root/etc/cont-init.d/50-config

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
#!/usr/bin/with-contenv bash
22

3+
if [ -d /var/www-tmp ]; then
4+
echo "New container detected. Setting up app folder and fixing permissions."
5+
mv /var/www-tmp /var/www
6+
chown -R abc:abc /var/www
7+
fi
8+
39
# create directory structure
410
mkdir -p \
511
/config/www/{uploads,files,images}
@@ -108,8 +114,5 @@ fi
108114
chown -R abc:abc \
109115
/config
110116

111-
find /var/www -print0 | xargs -P "$(nproc)" -I {} -0 chown -h abc:abc {}
112-
find /var/www -print0 -type d | xargs -P "$(nproc)" -I {} -0 chown -h abc:abc {}
113-
114117
# set lockfile to avoid DB waits for this specific container
115118
touch /dbwait.lock

0 commit comments

Comments
 (0)