Skip to content

Commit 409431b

Browse files
authored
Merge pull request #2 from lacatoire/poc-dockerize-doc-generation
Poc dockerize doc generation
2 parents b54bf0e + fcea864 commit 409431b

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

.docker/entrypoint.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,26 @@ FORMAT=${2:-xhtml}
1010
PACKAGE=${PACKAGE:-PHP}
1111
MANUAL_PATH="/var/www/$LANGUAGE/.manual.xml"
1212

13+
# 🧩 Step 1. Verify prerequisites (avoid silent empty mounts)
14+
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
29+
done
30+
echo "✅ All prerequisites found."
31+
echo ""
32+
1333
echo "🧩 Building PHP documentation..."
1434
echo "Language: $LANGUAGE"
1535
echo "Format: $FORMAT"

0 commit comments

Comments
 (0)