FROM docker.io/composer:latest AS composer WORKDIR /app COPY composer.json composer.lock ./ RUN composer install FROM docker.io/php:7.4-alpine COPY --from=composer /app /app COPY main.php functions.php /app/ WORKDIR /app ENTRYPOINT ["php", "main.php"]