# Test Dockerfile to identify available packages FROM php:5.6-apache WORKDIR /var/www/html # Update package lists first RUN apt-get update # Test each package individually RUN apt-get install -y curl || echo "curl failed" RUN apt-get install -y git || echo "git failed" RUN apt-get install -y zip || echo "zip failed" RUN apt-get install -y unzip || echo "unzip failed" # Test mcrypt (most important) RUN apt-get install -y libmcrypt-dev || echo "libmcrypt-dev failed" # Test image libraries one by one RUN apt-get install -y libpng-dev || echo "libpng-dev failed" RUN apt-get install -y libjpeg-dev || echo "libjpeg-dev failed" RUN apt-get install -y libfreetype6-dev || echo "libfreetype6-dev failed" # Test zip library RUN apt-get install -y zlib1g-dev || echo "zlib1g-dev failed" # Try to install PHP extensions RUN docker-php-ext-install mcrypt || echo "mcrypt extension failed" RUN docker-php-ext-install pdo || echo "pdo extension failed" RUN docker-php-ext-install pdo_mysql || echo "pdo_mysql extension failed" RUN docker-php-ext-install mbstring || echo "mbstring extension failed" # Test GD configuration RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ || echo "gd configure failed" RUN docker-php-ext-install gd || echo "gd extension failed" # Test zip extension RUN docker-php-ext-install zip || echo "zip extension failed" # Clean up RUN apt-get clean && rm -rf /var/lib/apt/lists/* # Install Composer RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer # Basic Apache setup RUN a2enmod rewrite ENV APACHE_DOCUMENT_ROOT=/var/www/html/public RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf # Test copy and basic setup COPY . /var/www/html/ RUN chown -R www-data:www-data /var/www/html # Test Laravel commands RUN if [ ! -f .env ]; then cp .env.example .env; fi || echo ".env creation failed" RUN composer install --no-dev --no-interaction || echo "composer install failed" RUN php artisan key:generate || echo "key generation failed" EXPOSE 80 CMD ["apache2-foreground"]