-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile-build
More file actions
40 lines (35 loc) · 1.77 KB
/
Copy pathDockerfile-build
File metadata and controls
40 lines (35 loc) · 1.77 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
ARG PHP_VERSION
ARG ALPINE_VERSION
FROM alpine AS new-alpine
FROM php:${PHP_VERSION}-cli-alpine${ALPINE_VERSION} AS build
COPY configure.sh /
COPY conf.d/php.prod.ini /usr/local/etc/php/conf.d/php.ini
COPY conf.d/90-xdebug.ini /usr/local/etc/php/conf.d/
COPY --from=new-alpine /etc/ssl/cert.pem /etc/ssl/cert.pem
ENV COMPOSER_DIR=/.composer \
SYMFONY_DIR=/.symfony
RUN HOME=/ \
&& /configure.sh \
&& rm /configure.sh \
&& mkdir $COMPOSER_DIR $SYMFONY_DIR \
&& apk add --no-cache $PHPIZE_DEPS \
&& apk add --update linux-headers \
&& pecl install xdebug-3.4.0 \
&& docker-php-ext-enable xdebug \
&& apk del $PHPIZE_DEPS \
&& rm -r /tmp/pear/cache/* /tmp/pear/download/* \
# Composer
&& curl --silent --fail-early https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
# Symfony CLI \
&& curl -sS https://get.symfony.com/cli/installer | bash && chmod +x /.symfony5/bin/symfony && mv /.symfony5/bin/symfony /usr/local/bin/symfony \
# QA - Globally https://twitter.com/s_bergmann/status/999635212723212288
&& wget -O phpunit https://phar.phpunit.de/phpunit-11.5.2.phar && chmod +x phpunit && mv phpunit /usr/local/bin/phpunit \
&& wget -O php-cs-fixer-v3 https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/releases/download/v3.65.0/php-cs-fixer.phar && chmod +x php-cs-fixer-v3 && mv php-cs-fixer-v3 /usr/local/bin/php-cs-fixer \
&& wget -O phpstan https://github.com/phpstan/phpstan/releases/download/2.0.4/phpstan.phar && chmod +x phpstan && mv phpstan /usr/local/bin/phpstan \
&& chmod -R o+rwx $COMPOSER_DIR $SYMFONY_DIR
WORKDIR /app
FROM build AS build-sqlsrv
COPY configure-sqlsrv.sh /
COPY conf.d/90-sqlsrv.ini /usr/local/etc/php/conf.d/
RUN /configure-sqlsrv.sh \
&& rm /configure-sqlsrv.sh