-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
51 lines (43 loc) · 1.3 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
51
FROM php:8.2.13-cli-alpine3.18
RUN apk add --no-cache $PHPIZE_DEPS \
curl \
libcurl \
wget \
libzip-dev \
libmcrypt-dev \
libxslt-dev \
libxml2-dev \
openssl-dev \
icu-dev \
zip \
unzip \
linux-headers
RUN docker-php-ext-install \
opcache \
zip \
xsl \
dom \
exif \
intl \
pcntl \
bcmath \
sockets
# PHP settings
RUN sed -i 's/memory_limit = 128M/memory_limit = 1024M/g' "$PHP_INI_DIR/php.ini-production" && \
sed -i 's/post_max_size = 8M/post_max_size = 1024M/g' "$PHP_INI_DIR/php.ini-production" && \
mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
# Nginx
RUN apk add --no-cache nginx
COPY ./nginx/nginx.conf /etc/nginx/nginx.conf
RUN [ -d /etc/nginx/conf.d ] || mkdir /etc/nginx/conf.d
COPY ./nginx/default.conf /etc/nginx/conf.d/default.conf
# PDO database drivers support
RUN apk --no-cache add postgresql-dev
RUN docker-php-ext-install \
pgsql pdo_pgsql pdo_mysql
# MongoDB support
RUN pecl install mongodb \
&& docker-php-ext-enable mongodb
RUN curl -s https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin/ --filename=composer
RUN docker-php-source delete \
&& apk del ${BUILD_DEPENDS}