Skip to content

Commit 24c5ec2

Browse files
author
lacatoire
committed
check real files instead of empty dirs created by Docker
1 parent 178b40c commit 24c5ec2

File tree

1 file changed

+20
-14
lines changed

1 file changed

+20
-14
lines changed

.docker/entrypoint.sh

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,27 @@ PACKAGE=${PACKAGE:-PHP}
1111
MANUAL_PATH="/var/www/$LANGUAGE/.manual.xml"
1212

1313
# 🧩 Step 1. Verify prerequisites (avoid silent empty mounts)
14+
echo "🔍 Checking required documentation repositories..."
15+
16+
# Check doc-base presence (must contain configure.php)
17+
if [ ! -f /var/www/doc-base/configure.php ]; then
18+
echo "❌ doc-base is missing or incomplete!"
19+
echo "👉 Please clone it before running Docker:"
20+
echo " git clone https://github.com/php/doc-base ../doc-base"
21+
echo ""
22+
exit 1
23+
fi
1424

15-
REQUIRED_DIRS="/var/www/doc-base /var/www/$LANGUAGE"
16-
17-
echo "🔍 Checking required documentation directories..."
18-
for DIR in $REQUIRED_DIRS; do
19-
if [ ! -d "$DIR" ]; then
20-
echo "❌ Missing required directory: $DIR"
21-
echo "👉 Please clone the required repositories before running Docker:"
22-
echo " git clone https://github.com/php/doc-base ../doc-base"
23-
echo " git clone https://github.com/php/doc-${LANGUAGE} ../doc-${LANGUAGE}"
24-
echo ""
25-
echo "💡 Tip: remove any empty folders and recreate containers with:"
26-
echo " docker compose down --volumes && docker compose up --force-recreate"
27-
exit 1
28-
fi
25+
# Check language documentation presence (must contain entities/)
26+
if [ ! -d /var/www/$LANGUAGE/entities ]; then
27+
echo "❌ doc-${LANGUAGE} is missing or incomplete!"
28+
echo "👉 Please clone it before running Docker:"
29+
echo " git clone https://github.com/php/doc-${LANGUAGE} ../doc-${LANGUAGE}"
30+
echo ""
31+
echo "💡 Tip: remove any empty folders and recreate containers with:"
32+
echo " docker compose down --volumes && docker compose up --force-recreate"
33+
exit 1
34+
fi
2935
done
3036
echo "✅ All prerequisites found."
3137
echo ""

0 commit comments

Comments
 (0)