-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (22 loc) · 682 Bytes
/
Dockerfile
File metadata and controls
31 lines (22 loc) · 682 Bytes
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
29
30
31
FROM php:8.1-apache
# Install dependencies
RUN apt-get update && \
apt-get install -y libzip-dev zip && \
docker-php-ext-configure zip && \
docker-php-ext-install zip pdo_mysql
# Enable Apache modules
RUN a2enmod rewrite
# Set working directory
WORKDIR /var/www/html
# Copy project files to working directory
COPY . .
# Install Composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
# Install project dependencies
RUN composer install
# Set permissions
RUN chown -R www-data:www-data /var/www/html/storage /var/www/html/bootstrap/cache
# Expose port
EXPOSE 80
# Start Apache
CMD ["apache2-foreground"]