Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save AronNovak/f1fa221a4efda82a5f6124c9710dde24 to your computer and use it in GitHub Desktop.
Save AronNovak/f1fa221a4efda82a5f6124c9710dde24 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Script to find Dockerfiles that install amd64 packages without arm64 equivalents
# This indicates potential Apple Silicon compatibility issues
echo "Scanning for problematic Dockerfiles (AMD64 without ARM64 support)..."
echo "==============================================================="
FOUND_ISSUES=0
# Find all .ddev/web-build/Dockerfile files
find . -path "*/.ddev/web-build/Dockerfile" -type f | while read -r dockerfile; do
PROJECT_PATH=$(dirname "$(dirname "$(dirname "$dockerfile")")")
PROJECT_NAME=$(basename "$PROJECT_PATH")
# Check if file contains amd64 package installations without arm64 equivalents
if grep -q "amd64\|x86_64" "$dockerfile" && ! grep -q "arm64\|aarch64" "$dockerfile"; then
echo "⚠ ISSUE FOUND: $dockerfile"
echo " Project: $PROJECT_NAME"
echo " This Dockerfile installs AMD64 packages but lacks ARM64 equivalents"
echo
echo " Problematic lines:"
grep -n "amd64\|x86_64" "$dockerfile" | sed 's/^/ /'
echo
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment