Merge pull request #33963 from pkit/fix_chown_squash

docker: fix root squashed data dirs
This commit is contained in:
Mikhail f. Shiryaev 2022-01-26 16:13:38 +01:00 committed by GitHub
commit 662444fe13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -65,7 +65,12 @@ do
# check if variable not empty # check if variable not empty
[ -z "$dir" ] && continue [ -z "$dir" ] && continue
# ensure directories exist # ensure directories exist
if ! mkdir -p "$dir"; then if [ "$DO_CHOWN" = "1" ]; then
mkdir="mkdir"
else
mkdir="$gosu mkdir"
fi
if ! $mkdir -p "$dir"; then
echo "Couldn't create necessary directory: $dir" echo "Couldn't create necessary directory: $dir"
exit 1 exit 1
fi fi