update
Browse files- Dockerfile +5 -5
Dockerfile
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
-
# Use the official PHP image
|
2 |
-
FROM php:8.
|
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
|
28 |
-
RUN composer
|
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"]
|