forked from necobm/symfony-api-restfull
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
57 lines (45 loc) · 1.31 KB
/
Dockerfile
File metadata and controls
57 lines (45 loc) · 1.31 KB
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
52
53
54
55
56
57
FROM php:8-fpm-alpine3.15 AS base
RUN apk --update add --no-cache \
alpine-sdk \
linux-headers \
openssl-dev \
php8-pear \
php8-dev \
autoconf \
automake \
make \
gcc \
g++ \
git \
bash \
icu-dev \
libzip-dev \
rabbitmq-c \
rabbitmq-c-dev \
postgresql-dev \
oniguruma-dev \
curl-dev
RUN docker-php-ext-install pdo pdo_mysql pdo_pgsql \
&& docker-php-ext-install -j$(nproc) \
bcmath \
opcache \
intl \
zip \
pcntl \
mbstring
RUN pecl install apcu-5.1.23 amqp-2.1.1 xdebug-3.3.0 redis-5.3.4
RUN docker-php-ext-enable amqp apcu opcache redis bcmath pcntl mbstring
RUN rm -rf /var/cache/apk/*
EXPOSE 9000
# Etapa de desarrollo
FROM base AS development
ENV TZ=${TZ}
RUN pecl channel-update pecl.php.net \
&& apk add --no-cache tzdata \
&& ln -sf /usr/share/zoneinfo/$TZ /etc/localtime
RUN pecl install xdebug \
&& docker-php-ext-enable xdebug
RUN echo "zend_extension=xdebug.so" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && \
echo "xdebug.mode=coverage" >> /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
COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer