# Use an official PHP 5.6 Apache image FROM php:5.6-apache # Set the working directory inside the container WORKDIR /var/www/html # Install required dependencies RUN apt-get update && \ apt-get install -y \ libfreetype6-dev \ libjpeg62-turbo-dev \ libpng12-dev \ libmcrypt-dev \ libzip-dev \ unzip \ git \ curl # Install Composer globally RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer # Enable required PHP extensions RUN docker-php-ext-install pdo_mysql mbstring zip mcrypt # Enable Apache modules RUN a2enmod rewrite # Copy the Laravel application files into the container COPY . . # Install Laravel dependencies RUN composer install --no-interaction --optimize-autoloader # Set permissions RUN chown -R www-data:www-data /var/www/html/storage /var/www/html/bootstrap # Expose port 80 EXPOSE 80 # Start the Apache server CMD ["apache2-foreground"]