-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
27 lines (18 loc) · 880 Bytes
/
Copy pathDockerfile
File metadata and controls
27 lines (18 loc) · 880 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
# syntax=docker/dockerfile:1
FROM devilbox/php-fpm-7.4:latest AS cli
RUN sed -e 's/max_execution_time = 30/max_execution_time = 100/' -i /usr/local/etc/php/docker-php.ini
RUN apt-get update && apt-get install -y git unzip curl
# Install Composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
RUN composer --version
ENV COMPOSER_MEMORY_LIMIT=-1
ENV COMPOSER_ALLOW_SUPERUSER=1
FROM cli
WORKDIR /app/
# Install dependencies from manifests only (layer cached across source changes);
# autoloader is generated after sources are copied
COPY composer.json composer.lock /app/
RUN --mount=type=cache,target=/root/.composer/cache \
composer install --no-scripts --no-autoloader --no-interaction --prefer-dist --no-progress
COPY . /app/
RUN composer dump-autoload --optimize --classmap-authoritative --no-interaction