-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
42 lines (32 loc) · 1.02 KB
/
Dockerfile
File metadata and controls
42 lines (32 loc) · 1.02 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
32
33
34
35
36
37
38
39
40
41
42
# PHP image
FROM php:8.5-apache
# enable required packages and gd lib
RUN apt-get update && apt-get install -y \
libwebp-dev libxpm-dev zlib1g-dev \
libfreetype6-dev \
libjpeg62-turbo-dev \
libpng-dev \
libzip-dev \
unzip \
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install -j$(nproc) gd zip mysqli \
&& docker-php-ext-enable mysqli zip
# enable mysqli
RUN docker-php-ext-install mysqli && docker-php-ext-enable mysqli
# set working directory
WORKDIR /var/www/html/Delus
# copy project files
COPY . .
# set server name >> localhost
RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf
# enable apache rewrite mod
RUN a2enmod rewrite
# Configure Apache to trust proxy headers
RUN echo "RemoteIPHeader X-Forwarded-For" >> /etc/apache2/apache2.conf && \
echo "RemoteIPInternalProxy 172.16.0.0/12" >> /etc/apache2/apache2.conf
# restart server
RUN service apache2 restart
# listen to port 80
EXPOSE 80
# run apache foreground
CMD ["apache2-foreground"]