forked from rtm516/Open-DMARC-Analyzer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (27 loc) · 912 Bytes
/
Copy pathDockerfile
File metadata and controls
38 lines (27 loc) · 912 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
32
33
34
35
36
37
38
FROM composer:lts AS composer
FROM php:8.2-fpm
# Install system dependencies
RUN apt-get update -y && apt-get install -y \
nginx \
git \
libpq-dev \
supervisor
# Copy composer from the previous stage
COPY --from=composer /usr/bin/composer /usr/bin/composer
# Copy application files
COPY . /var/www/html/
COPY config.php.pub-docker /var/www/html/config.php
WORKDIR /var/www/html/
# Install PHP dependencies
RUN composer require kevinoo/phpwhois:^6.3
RUN composer require maxmind-db/reader:~1.0
# Enable PHP extensions
RUN docker-php-ext-install pdo pdo_mysql pdo_pgsql
# Use production PHP config
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
# Copy NGINX config
COPY default.conf /etc/nginx/conf.d/default.conf
# Copy Supervisor config to run both PHP-FPM and NGINX
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
EXPOSE 80
CMD ["/usr/bin/supervisord"]