-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
37 lines (29 loc) · 1.31 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
FROM php:8.2-cli
MAINTAINER Vitalii Zhuk <[email protected]>
ARG XDEBUG_REMOTE_HOST='host.docker.internal'
ARG XDEBUG_REMOTE_PORT=9000
ENV PHP_IDE_CONFIG='serverName=amqp.local'
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 && \
printf '\n' | pecl install amqp && \
yes | pecl install xdebug && \
docker-php-ext-install sockets && \
docker-php-ext-enable amqp xdebug
# 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