-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
46 lines (32 loc) · 1.16 KB
/
Copy pathDockerfile
File metadata and controls
46 lines (32 loc) · 1.16 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
ARG COMPOSER_VERSION=2.6
ARG PHP_VERSION=8.2
ARG LINUX_OS="alpine"
FROM composer:${COMPOSER_VERSION} as composer
FROM php:${PHP_VERSION}-cli-${LINUX_OS}
ENV COMPOSER_HOME=/root/.composer
RUN mkdir "$COMPOSER_HOME"
COPY --from=composer /usr/bin/composer /usr/bin/composer
COPY --from=composer /tmp/keys.* $COMPOSER_HOME/
RUN apk update && apk add ca-certificates zip 7zip git bash
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/
RUN install-php-extensions zip pcntl soap xdebug pcov igbinary intl
WORKDIR /code-quality
COPY src src
COPY bin bin
COPY composer.json composer.json
COPY .phplint.yml .phplint.yml
COPY psalm.xml.dist psalm.xml.dist
COPY phpcs.xml.dist phpcs.xml.dist
COPY phpunit.xml.dist phpunit.xml.dist
COPY tests tests
COPY default-quality-config default-quality-config
COPY entrypoint.sh entrypoint.sh
RUN composer validate && composer audit && composer install
ENV PATH="$PATH:/code-quality/bin:/code-quality/vendor/bin"
ENV RUN_LINT="true"
ENV RUN_STATIC_ANALYSIS="true"
ENV RUN_CODE_STYLE="true"
ENV RUN_UNIT_TESTS="true"
ENV TARGET_TEST_SUITE=""
WORKDIR /mnt/project
ENTRYPOINT [ "/code-quality/entrypoint.sh" ]