-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (27 loc) · 783 Bytes
/
Copy pathDockerfile
File metadata and controls
33 lines (27 loc) · 783 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
ARG PHP_TAG=8.0-cli-trixie
ARG COMPOSER_TAG=2.3
FROM composer:${COMPOSER_TAG} AS composer_source
FROM php:${PHP_TAG}
RUN <<-EOF
apt-get update
apt-get install -y autoconf pkg-config unzip
pecl channel-update pecl.php.net
pecl install xdebug
docker-php-ext-enable xdebug
EOF
RUN <<-EOF
cat <<-SHELL >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
xdebug.client_host=host.docker.internal
xdebug.mode=develop
xdebug.start_with_request=yes
SHELL
cat <<-SHELL >> /usr/local/etc/php/conf.d/php.ini
display_errors=On
error_reporting=E_ALL
date.timezone=UTC
SHELL
EOF
COPY --from=composer_source /usr/bin/composer /usr/bin/composer
ENV COMPOSER_ALLOW_SUPERUSER 1
ENV PATH="/root/.composer/vendor/bin:${PATH}"
RUN composer global require squizlabs/php_codesniffer