-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
39 lines (31 loc) · 1.42 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
FROM php:8.2-cli
MAINTAINER Vitaliy Zhuk <zhuk2205@gmail.com>
ARG XDEBUG_REMOTE_HOST='host.docker.internal'
ARG XDEBUG_REMOTE_PORT=9000
ENV PHP_IDE_CONFIG='serverName=diagnostic'
RUN \
apt-get update && \
apt-get install -y --no-install-recommends \
git ssh-client \
zip unzip
# Install additional php extensions
RUN \
apt-get install -y --no-install-recommends \
librabbitmq-dev && \
docker-php-ext-install pdo pdo_mysql sockets && \
printf '\n' | pecl install amqp && \
printf '\n' | pecl install redis && \
printf '\n' | pecl install mongodb && \
yes | pecl install xdebug && \
docker-php-ext-enable amqp xdebug redis mongodb
# Configure XDebug
RUN \
echo "xdebug.mode=debug" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && \
echo "xdebug.remote_connect_back=off" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && \
echo "xdebug.client_host=${XDEBUG_REMOTE_HOST}" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && \
echo "xdebug.client_port=${XDEBUG_REMOTE_PORT}" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && \
echo "xdebug.idekey=PHPSTORM" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && \
echo "xdebug.max_nesting_level=1500" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
# Install composer
RUN curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer
WORKDIR /code