-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
22 lines (18 loc) · 859 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# BASE STAGE
FROM php:7.4.29-apache as base
# install extensions
RUN pecl install xdebug \
&& docker-php-ext-install mysqli pdo pdo_mysql \
&& docker-php-ext-enable xdebug mysqli
# modify config
RUN echo "xdebug.mode=debug" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
&& echo "xdebug.client_host=host.docker.internal" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
&& echo "xdebug.client_port=9003" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
&& echo "xdebug.start_with_request=yes" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
&& echo "file_uploads=On" >> /usr/local/etc/php/conf.d/file-upload.ini \
&& echo "upload_tmp_dir=/tmp" >> /usr/local/etc/php/conf.d/file-upload.ini
EXPOSE 80 9003
WORKDIR /var/www/html/
# PRODUCTION STAGE
FROM base as production
COPY . /var/www/html/