forked from AlphaFrederic94/Hospital-project-on-AWS-cloud
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
28 lines (21 loc) · 762 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Use the official PHP image with Apache
FROM php:8.2-apache
# Install system dependencies and enable PHP extensions
RUN apt-get update && apt-get install -y \
git \
zip \
unzip \
&& docker-php-ext-install pdo_mysql
# Install Composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
# Set the working directory
WORKDIR /var/www/html
# Copy the current directory contents into the container at /var/www/html
COPY . /var/www/html
# Install PHP dependencies with Composer
RUN composer install --no-dev --optimize-autoloader
# Set the correct permissions
RUN chown -R www-data:www-data /var/www/html
# Expose port 80 and run Apache in the foreground
EXPOSE 80
CMD ["apache2-foreground"]