-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (22 loc) · 692 Bytes
/
Dockerfile
File metadata and controls
32 lines (22 loc) · 692 Bytes
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
FROM composer:2.8.11 AS composer
FROM php:8.4-cli AS build
COPY --from=composer /usr/bin/composer /usr/bin/composer
RUN apt-get update && apt-get install -y \
git \
unzip \
zlib1g-dev \
libzip-dev
RUN docker-php-ext-install zip
RUN mkdir -p /composer && mkdir -p /compiler
ENV COMPOSER_HOME=/composer
ENV COMPOSER_ALLOW_SUPERUSER=1
ADD composer.json /compiler/composer.json
ADD composer.lock /compiler/composer.lock
RUN cd /compiler \
&& composer install --optimize-autoloader --no-dev
FROM php:8.4-cli
COPY --from=build /compiler/ /compiler/
ADD compile.php /compiler/compile.php
ADD entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]