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

Commit 02045c7

Browse files
committed
Attempting faster chown, especially with default UID/GID
1 parent 3faab8b commit 02045c7

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ RUN \
5656
--no-interaction && \
5757
echo "**** removing unused chrome download ****" && \
5858
rm -rf /app/invoiceninja/vendor/beganovich/snappdf/versions && \
59+
echo "**** setting permissions ****" && \
60+
chown -R abc:abc /app/invoiceninja && \
5961
echo "**** cleanup ****" && \
6062
apk del --purge \
6163
build-dependencies && \

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

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,10 @@ php artisan optimize
3131
crontab -u abc /defaults/crontabs/abc
3232

3333
# permissions
34-
find . -maxdepth 1 ! -name '.' ! -name '..' ! -name 'vendor' -print -exec chown -R abc:abc {} \;
35-
chown -R abc:abc \
36-
/config
37-
chown abc:abc \
38-
/app \
39-
/app/invoiceninja
34+
# permissions
35+
find \
36+
/config \
37+
/app/invoiceninja \
38+
! -user abc -o ! -group abc -exec chown abc:abc {} \;
39+
40+
find /config ! -perm -g+w -exec chmod g+w {} \;

0 commit comments

Comments
 (0)