-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
67 lines (55 loc) · 1.59 KB
/
Dockerfile
File metadata and controls
67 lines (55 loc) · 1.59 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
ARG PHP_VERSION=8.5
FROM php:${PHP_VERSION}-cli-alpine
ARG UID=10001
ARG GID=10001
ENV LC_ALL=C.UTF-8
ENV COMPOSER_HOME=/composer
ENV PATH="${COMPOSER_HOME}/vendor/bin:${PATH}"
RUN <<EOF
set -eux
apk add --no-cache \
make \
git \
unzip
EOF
RUN <<EOF
set -eux
(curl -sSLf https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions -o - || echo 'return 1') | sh -s \
@composer \
opcache \
uv \
pcntl \
sockets \
intl \
bcmath \
pgsql \
pdo_pgsql \
xdebug
EOF
RUN <<EOF
set -eux
addgroup -g ${GID} dev
adduser -u ${UID} -G dev -D dev
chown -R dev:dev ${COMPOSER_HOME}
touch /xdebug.log
chown dev:dev /xdebug.log
echo 'xdebug.mode=off' >> /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.log=/xdebug.log' >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
EOF
USER dev
RUN <<EOF
set -eux
composer global config allow-plugins.infection/extension-installer false
composer global config allow-plugins.ergebnis/composer-normalize true
composer global require --no-cache \
friendsofphp/php-cs-fixer \
phpyh/coding-standard \
phpstan/phpstan \
phpstan/phpstan-strict-rules \
phpstan/phpstan-phpunit \
rector/rector \
shipmonk/composer-dependency-analyser \
ergebnis/composer-normalize \
infection/infection
EOF