forked from geodesicsolutions-community/geocore-community
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
50 lines (41 loc) · 1.14 KB
/
Dockerfile
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
43
44
45
46
47
48
49
50
FROM php:7.4-apache
RUN apt-get update && apt-get install -y \
git \
libcurl4-openssl-dev \
libicu-dev \
libmcrypt-dev \
libpng-dev \
libpq-dev \
libxml2-dev \
libzip-dev \
mariadb-client \
pkg-config \
unzip \
zip \
zlib1g-dev
RUN rm -r /var/lib/apt/lists/*
RUN pecl install xdebug-3.1.1
RUN docker-php-ext-configure pdo_mysql --with-pdo-mysql=mysqlnd
RUN docker-php-ext-install \
curl \
gd \
json \
xml \
xmlrpc \
zip \
intl \
pcntl \
pdo_mysql \
mysqli \
opcache
RUN docker-php-ext-enable xdebug
# install composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin/ --filename=composer
# 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"