-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (25 loc) · 993 Bytes
/
Dockerfile
File metadata and controls
32 lines (25 loc) · 993 Bytes
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
ARG PHP_VERSION=8.5
FROM php:${PHP_VERSION}-cli
RUN apt-get update && apt-get install -y \
git \
unzip \
libicu-dev \
libzip-dev \
&& docker-php-ext-install \
bcmath \
intl \
zip \
&& pecl install xdebug \
&& docker-php-ext-enable xdebug \
&& rm -rf /var/lib/apt/lists/*
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
RUN echo "xdebug.mode=debug,coverage" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
&& echo "xdebug.client_host=host.docker.internal" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
&& echo "xdebug.client_port=9003" >> /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
WORKDIR /app
COPY composer.json composer.lock ./
RUN composer install --no-interaction --no-scripts --no-autoloader
COPY . .
RUN composer dump-autoload --optimize
CMD ["tail", "-f", "/dev/null"]