#!/bin/bash # Quick test script to verify Dockerfile.production contains Git and Composer set -e SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)" DOCKERFILE="$PROJECT_ROOT/Dockerfile.production" echo "๐Ÿงช Testing Dockerfile.production for Git and Composer" echo "" # Check if Dockerfile exists if [ ! -f "$DOCKERFILE" ]; then echo "โŒ Dockerfile.production not found at $DOCKERFILE" exit 1 fi echo "โœ… Found Dockerfile.production" echo "" # Check for git installation echo "๐Ÿ“‹ Checking for git installation..." if grep -q "git" "$DOCKERFILE"; then echo "โœ… git found in Dockerfile" echo " Relevant lines:" grep -n "git" "$DOCKERFILE" | head -3 else echo "โŒ git NOT found in Dockerfile" exit 1 fi # Check for composer installation echo "" echo "๐Ÿ“‹ Checking for composer installation..." if grep -q "composer" "$DOCKERFILE"; then echo "โœ… composer found in Dockerfile" echo " Relevant lines:" grep -n "composer" "$DOCKERFILE" | head -3 else echo "โŒ composer NOT found in Dockerfile" exit 1 fi # Check for entrypoint copy echo "" echo "๐Ÿ“‹ Checking for entrypoint.sh copy..." if grep -q "entrypoint.sh\|ENTRYPOINT" "$DOCKERFILE"; then echo "โœ… entrypoint.sh copy/ENTRYPOINT found" echo " Relevant lines:" grep -n "entrypoint\|ENTRYPOINT" "$DOCKERFILE" | head -3 else echo "โŒ entrypoint.sh copy/ENTRYPOINT NOT found" exit 1 fi echo "" echo "โœ… All Dockerfile checks passed!"