-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (23 loc) · 1.06 KB
/
Dockerfile
File metadata and controls
31 lines (23 loc) · 1.06 KB
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.5-apache
COPY ./.docker/apache/000-default.conf /etc/apache2/sites-available/000-default.conf
COPY ./.docker/php/local.ini /usr/local/etc/php/conf.d/local.ini
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
ENV APACHE_DOCUMENT_ROOT=/var/www/html/public
RUN apt-get update -y && apt-get upgrade -y
RUN apt-get install libapache2-mod-xsendfile -y && a2enmod xsendfile
RUN a2enmod rewrite
RUN apt-get install tree nano libzip-dev libwebp-dev libfreetype6-dev libjpeg62-turbo-dev libpng-dev zlib1g-dev libicu-dev libwebp-dev -y
RUN apt-get install npm -y
RUN docker-php-ext-configure gd --with-webp --with-freetype --with-jpeg;
RUN docker-php-ext-install pdo_mysql \
&& docker-php-ext-install mysqli \
&& docker-php-ext-install zip \
&& docker-php-ext-install exif \
&& docker-php-ext-install gd \
&& docker-php-ext-install bcmath \
&& docker-php-ext-install intl \
&& docker-php-ext-install pcntl
# Set the correct permissions for the application files
RUN chown -R www-data:www-data /var/www
# Set Default User for Apache
USER www-data