FROM docker.io/composer AS composer

WORKDIR /app

COPY composer.json ./

RUN composer install



FROM docker.io/php:alpine

COPY --from=composer /app /app
COPY main.php functions.php /app/

WORKDIR /app

ENTRYPOINT ["php", "main.php"]