-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
49 lines (27 loc) · 863 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
FROM composer:2.7.2 AS composer
##################################
FROM composer AS vendor
WORKDIR /K-pi
COPY composer.* ./
RUN composer install --ignore-platform-reqs --no-scripts --no-plugins --no-dev
##################################
FROM vendor AS vendor-dev
RUN composer install --ignore-platform-reqs --no-scripts --no-plugins
##################################
FROM php:8.3.4-cli-alpine3.19 AS base
WORKDIR /K-pi
ENTRYPOINT ["php", "/K-pi/bin/console"]
##################################
FROM base AS test
RUN apk add --no-cache $PHPIZE_DEPS linux-headers \
&& pecl install \
xdebug-3.3.1 \
&& docker-php-ext-enable \
xdebug
COPY --from=vendor-dev /K-pi/vendor /K-pi/vendor
ENV XDEBUG_MODE=coverage
COPY . .
##################################
FROM base AS prod
COPY --from=vendor /K-pi/vendor /K-pi/vendor
COPY . .