-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
29 lines (21 loc) · 954 Bytes
/
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
# syntax=docker/dockerfile:1.3
ARG PHP_VERSION=8.1
ARG XDEBUG_VERSION="-3.1.6"
FROM php:${PHP_VERSION}-cli as dev
ARG DEBIAN_FRONTEND=noninteractivef
ARG XDEBUG_VERSION
ENV COMPOSER_FLAGS="--prefer-dist --no-interaction"
ENV COMPOSER_ALLOW_SUPERUSER 1
COPY docker/php/php.ini /usr/local/etc/php/php.ini
COPY docker/php/xdebug.ini /usr/local/etc/php/conf.d/
RUN apt update -q \
&& apt install -y --no-install-recommends git zip unzip libzip4 libzip-dev zlib1g-dev \
&& docker-php-ext-install pdo_mysql pcntl zip \
&& apt-get remove --autoremove -y libzip-dev zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin/ --filename=composer \
&& composer global config allow-plugins.symfony/flex true \
&& composer global require --no-progress --no-scripts --no-plugins symfony/flex
RUN pecl install xdebug${XDEBUG_VERSION} \
&& docker-php-ext-enable xdebug
WORKDIR /code