forked from geodesicsolutions-community/geocore-community
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.php8
41 lines (34 loc) · 1.09 KB
/
Dockerfile.php8
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
FROM php:8.1-apache
RUN apt-get update && apt-get install -y \
libicu-dev \
libpq-dev \
libmcrypt-dev \
libpng-dev \
mariadb-client \
git \
zip \
unzip \
zlib1g-dev \
&& rm -r /var/lib/apt/lists/* \
&& pecl install xdebug-3.1.3 \
&& docker-php-ext-configure pdo_mysql --with-pdo-mysql=mysqlnd \
&& docker-php-ext-install \
gd \
intl \
pcntl \
pdo_mysql \
mysqli \
opcache \
&& docker-php-ext-enable xdebug
#install composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin/ --filename=composer
#set our application folder as an environment variable
ENV APP_HOME /var/www/html
#change uid and gid of apache to docker user uid/gid
RUN usermod -u 1000 www-data && groupmod -g 1000 www-data
#change the web_root to cakephp /var/www/html/src folder
RUN sed -i -e "s/html/html\/src/g" /etc/apache2/sites-enabled/000-default.conf
# enable apache module rewrite
RUN a2enmod rewrite
# use default developer config
RUN mv "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini"