| Docker Documentation https://docs.docker.com/develop/develop-images/dockerfile_best-practices/ Use multi-stage builds - if your build contains several layers, you can order them from the less frequently changed (to ensure the build cache is reusable) to the more frequently changed Don’t install unnecessary packages Minimize the number of layers
3/3] RUN composer install ∵ scriptが走っている # syntax=docker/dockerfile:1 FROM composer:2.2 AS dep COPY composer.* /app/ RUN composer install FROM php:8.1-apache COPY --from=dep /app/vendor/ \ /var/www/html/vendor/ COPY . /var/www/html/