docker: test if _build directory exists before chown

This commit is contained in:
Glenn Y. Rolland 2021-12-06 11:10:43 +01:00
parent b9396e150c
commit d43f349827

View file

@ -17,6 +17,8 @@ if ! grep -q "^[^:]*:[^:]*:$EXT_UID:" /etc/passwd ; then
useradd -r -u "$EXT_UID" -g appuser appuser useradd -r -u "$EXT_UID" -g appuser appuser
fi fi
if [ -d "_build" ]; then
chown -R "$EXT_UID:$EXT_GID" _build chown -R "$EXT_UID:$EXT_GID" _build
fi
exec gosu "$EXT_UID:$EXT_GID" make "$@" exec gosu "$EXT_UID:$EXT_GID" make "$@"