-
Notifications
You must be signed in to change notification settings - Fork 190
/
Copy pathDockerfile
30 lines (22 loc) · 897 Bytes
/
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
ARG PHP_VERSION=8.4
FROM php:${PHP_VERSION}-alpine
ARG DEPENDENCIES=highest
RUN set -eux; \
apk add --no-cache acl libzip; \
apk add --no-cache --virtual .build-deps ${PHPIZE_DEPS} zlib-dev libzip-dev; \
docker-php-ext-install zip opcache; \
pecl install pcov;\
docker-php-ext-enable pcov; \
apk del .build-deps;
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
WORKDIR /app
COPY composer.json /app/
RUN set -eux; \
composer install --no-interaction; \
if [ "${DEPENDENCIES}" = "lowest" ]; then COMPOSER_MEMORY_LIMIT=-1 composer update --prefer-lowest --no-interaction; fi; \
if [ "${DEPENDENCIES}" = "highest" ]; then COMPOSER_MEMORY_LIMIT=-1 composer update --no-interaction; fi
COPY --link ./examples /app/examples
COPY --link ./src /app/src
COPY --link ./tests /app/tests
COPY --link ./phpunit.xml.dist /app/
COPY --link ./psalm.xml /app/