kenken999 commited on
Commit
886ae5b
·
verified ·
1 Parent(s): 3f425a7
Files changed (1) hide show
  1. Dockerfile +5 -5
Dockerfile CHANGED
@@ -1,5 +1,5 @@
1
- # Use the official PHP image
2
- FROM php:8.2-apache
3
 
4
  # Install necessary packages and PHP extensions
5
  RUN apt-get update && apt-get install -y \
@@ -24,8 +24,8 @@ COPY ./php/ /var/www/html
24
  # Ensure .env file is copied
25
  COPY ./php/.env /var/www/html/.env
26
 
27
- # Run composer install without ignoring platform requirements
28
- RUN composer install --working-dir=/var/www/html --no-scripts
29
 
30
  # Set Apache DocumentRoot to Laravel's public directory
31
  RUN sed -i 's|/var/www/html|/var/www/html/public|' /etc/apache2/sites-available/000-default.conf
@@ -51,4 +51,4 @@ RUN mkdir -p /var/www/html/storage \
51
  EXPOSE 7860
52
 
53
  # Start Apache
54
- CMD ["apache2-foreground"]
 
1
+ # Use the official PHP image with PHP 8.1
2
+ FROM php:8.1-apache
3
 
4
  # Install necessary packages and PHP extensions
5
  RUN apt-get update && apt-get install -y \
 
24
  # Ensure .env file is copied
25
  COPY ./php/.env /var/www/html/.env
26
 
27
+ # Run composer update to ensure compatible versions of dependencies
28
+ RUN composer update --working-dir=/var/www/html --no-scripts
29
 
30
  # Set Apache DocumentRoot to Laravel's public directory
31
  RUN sed -i 's|/var/www/html|/var/www/html/public|' /etc/apache2/sites-available/000-default.conf
 
51
  EXPOSE 7860
52
 
53
  # Start Apache
54
+ CMD ["apache2-foreground"]