-
Notifications
You must be signed in to change notification settings - Fork 19
/
Dockerfile
33 lines (23 loc) · 883 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
FROM php:8.2-cli-alpine as dependencies
WORKDIR /dependencies
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/bin/
RUN apk --update add --no-cache --virtual .build-deps \
$PHPIZE_DEPS \
&& apk --update add --no-cache \
git \
&& install-php-extensions \
pcov \
&& apk del .build-deps
COPY --from=composer /usr/bin/composer /usr/bin/composer
COPY composer.json /dependencies
COPY composer.lock /dependencies
RUN composer install \
&& git config --global --add safe.directory /app
FROM php:8.2-cli-alpine
ARG API_CLIENT_GENERATOR_VERSION
ENV API_CLIENT_GENERATOR_VERSION=$API_CLIENT_GENERATOR_VERSION
COPY . /generator
COPY --from=dependencies /dependencies/vendor /generator/vendor
RUN chmod +x /generator/bin/api-client-generator
WORKDIR /generator/bin
CMD ["php", "api-client-generator", "generate"]