Laravel deploy missing vendor folder

Hi I’m having a similar problem with this thread and it is a simple laravel app. Everything is in defaults (Dockerfile). I tried everything like rebuilding another instance, no cache + remote-only on deploys, even changing regions for the app and the builder (depot).

I’m having an error with "/var/www/html/vendor": not found:

==> Building image
==> Building image with Depot
--> build:
[+] Building 75.4s (28/32)
 => [internal] load build definition from Dockerfile                                                                       0.3s
 => => transferring dockerfile: 4.60kB                                                                                     0.3s
 => resolve image config for docker-image://docker.io/docker/dockerfile:experimental                                       0.9s
 => CACHED docker-image://docker.io/docker/dockerfile:experimental@sha256:600e5c62eedff338b3f7a0850beb7c05866e0ef27b2d2e8  0.0s
 => => resolve docker.io/docker/dockerfile:experimental@sha256:600e5c62eedff338b3f7a0850beb7c05866e0ef27b2d2e8c02aa468e78  0.0s
 => [internal] load .dockerignore                                                                                          0.2s
 => => transferring context: 72B                                                                                           0.2s
 => [internal] load build definition from Dockerfile                                                                       0.0s
 => => Deduplicating step ID [internal] load build definition from Dockerfile, another build is calculating it             0.0s
 => [internal] load metadata for docker.io/library/ubuntu:22.04                                                            0.7s
 => [internal] load metadata for docker.io/library/node:18                                                                 0.4s
 => CACHED FROM docker.io/library/composer:2                                                                               0.4s
 => => resolve docker.io/library/composer:2                                                                                0.4s
 => [internal] load build context                                                                                         73.2s
 => => transferring context: 26.50kB                                                                                       0.4s
 => CACHED [node_modules_go_brrr 1/7] FROM docker.io/library/node:18@sha256:685575a50a36368b412e4362313eb733e1ec6a0315e69  0.0s
 => => resolve docker.io/library/node:18@sha256:685575a50a36368b412e4362313eb733e1ec6a0315e6910fdd1a6309456dd967           0.0s
 => CACHED [base  1/14] FROM docker.io/library/ubuntu:22.04@sha256:67cadaff1dca187079fce41360d5a7eb6f7dcd3745e53c79ad5efd  0.0s
 => => resolve docker.io/library/ubuntu:22.04@sha256:67cadaff1dca187079fce41360d5a7eb6f7dcd3745e53c79ad5efd8563118240      0.0s
 => [node_modules_go_brrr 2/7] RUN mkdir /app                                                                              0.1s
 => [node_modules_go_brrr 3/7] RUN mkdir -p  /app                                                                          0.1s
 => [node_modules_go_brrr 4/7] WORKDIR /app                                                                                0.0s
 => [node_modules_go_brrr 5/7] COPY . .                                                                                    0.1s
 => [base  2/14] COPY --from=composer:2 /usr/bin/composer /usr/bin/composer                                                0.0s
 => [base  3/14] COPY .fly/php/ondrej_ubuntu_php.gpg /etc/apt/trusted.gpg.d/ondrej_ubuntu_php.gpg                          0.0s
 => [base  4/14] ADD .fly/php/packages/8.2.txt /tmp/php-packages.txt                                                       0.0s
 => [base  5/14] RUN apt-get update     && apt-get install -y --no-install-recommends gnupg2 ca-certificates git-core cu  72.0s
 => [base  6/14] COPY .fly/nginx/ /etc/nginx/                                                                              0.1s
 => [base  7/14] COPY .fly/fpm/ /etc/php/8.2/fpm/                                                                          0.0s
 => [base  8/14] COPY .fly/supervisor/ /etc/supervisor/                                                                    0.0s
 => [base  9/14] COPY .fly/entrypoint.sh /entrypoint                                                                       0.0s
 => [base 10/14] COPY .fly/start-nginx.sh /usr/local/bin/start-nginx                                                       0.0s
 => [base 11/14] RUN chmod 754 /usr/local/bin/start-nginx                                                                  0.1s
 => [base 12/14] COPY . /var/www/html                                                                                      0.1s
 => [base 13/14] WORKDIR /var/www/html                                                                                     0.0s
 => [base 14/14] RUN composer install --optimize-autoloader --no-dev -vvv     && mkdir -p storage/logs     && php artisan  0.2s
 => ERROR [node_modules_go_brrr 6/7] COPY --from=base /var/www/html/vendor /app/vendor                                     0.0s
------
 > [node_modules_go_brrr 6/7] COPY --from=base /var/www/html/vendor /app/vendor:
------
Error: failed to fetch an image or build from source: error building: failed to solve: failed to compute cache key: failed to calculate checksum of ref rtlyub2yterc5g3y74100qehu::9cf9vai0ji0xc2u328bnxixnw: "/var/www/html/vendor": not found

Hi! This is a problem with the build proper because the step where /var/www/html vendor is created (which would be the compose step, base 14/14) is failing and so it’s not putting those files for subsequent steps to use.

This is not a problem with the builder or the Fly.io platform. You should be able to get more details by asking for a detailed log, inspect the log carefully to see why composer is blowing up and fix that.

BUILDKIT_PROGRESS=plain fly deploy --build-only

You can also try a local build if you have Docker installed, it should fail the same way as the remote build:

BUILDKIT_PROGRESS=plain docker build --tag my-app .

Thank you very much @roadmr!! This is what I need :folded_hands:t5: