-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
46 lines (39 loc) · 1.05 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
40
41
42
43
44
45
46
ARG PHP_VERSION
FROM php:${PHP_VERSION}-cli-bookworm
RUN <<-EOF
apt-get update
apt-get install -y autoconf pkg-config
pecl channel-update pecl.php.net
pecl install xdebug
docker-php-ext-enable opcache 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
ENV COMPOSER_ALLOW_SUPERUSER 1
RUN <<-EOF
apt-get update
apt-get install unzip
curl -s https://raw.githubusercontent.com/composer/getcomposer.org/76a7060ccb93902cd7576b67264ad91c8a2700e2/web/installer | php -- --quiet
mv composer.phar /usr/local/bin/composer
cat <<-SHELL >> /root/.bashrc
export PATH="$HOME/.composer/vendor/bin:$PATH"
SHELL
EOF
# package specifics
RUN <<-EOF
pecl install apcu
docker-php-ext-enable apcu opcache
cat <<-SHELL >> /usr/local/etc/php/conf.d/docker-php-ext-apcu.ini
apc.enable_cli=On
SHELL
EOF