Skip to content
This repository was archived by the owner on Apr 28, 2024. It is now read-only.

Commit c55d49a

Browse files
committed
overlay-fs bug workaround with chown
1 parent 32851cf commit c55d49a

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ RUN \
5858
rm -rf /app/invoiceninja/vendor/beganovich/snappdf/versions && \
5959
echo "**** setting permissions ****" && \
6060
chown -R abc:abc /app/invoiceninja && \
61+
echo "**** overlay-fs workaround ****" && \
62+
mv /app /app-tmp && \
6163
echo "**** cleanup ****" && \
6264
apk del --purge \
6365
build-dependencies && \

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

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

3+
if [ -d /app-tmp ]; then
4+
echo "New container detected. Setting up app folder and fixing permissions."
5+
mv /app-tmp /app
6+
chown -R abc:abc /app
7+
fi
8+
39
cd /app/invoiceninja
410

511
# copy config
@@ -30,10 +36,4 @@ php artisan optimize
3036
# install crontab
3137
crontab -u abc /defaults/crontabs/abc
3238

33-
# permissions
34-
CORES=$(nproc --all)
35-
find \
36-
/app/invoiceninja \
37-
/config \
38-
! -user abc ! -group abc -print0 | \
39-
xargs -P $((CORES*2*16)) -I {} chown abc:abc {}
39+
chown -R abc:abc /config

0 commit comments

Comments
 (0)