-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
39 lines (31 loc) · 891 Bytes
/
Dockerfile
File metadata and controls
39 lines (31 loc) · 891 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
33
34
35
36
37
38
39
FROM php:8.5-cli
ENV XDEBUG_MODE=off
ENV PHP_CS_FIXER_IGNORE_ENV=1
# Install system dependencies
RUN apt-get update -y \
&& apt-get install -y --no-install-recommends \
git \
unzip \
zip \
libgmp-dev \
&& rm -rf /var/lib/apt/lists/*
# Install PHP extensions
RUN pecl channel-update pecl.php.net \
# XDebug
&& pecl install xdebug \
&& docker-php-ext-enable xdebug \
# bcmath
&& docker-php-ext-install bcmath \
# gmp
&& docker-php-ext-install gmp \
# Cleanup
&& docker-php-source delete
# Copy configuration files
COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
RUN echo "memory_limit = 1G" > /usr/local/etc/php/conf.d/memory-limit.ini
# Install latest composer
COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer
# Fix git safe.directory for mounted volumes
RUN git config --system --add safe.directory '*'
WORKDIR /app
CMD ["php", "run.php"]