Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Makoto0528's avatar

Error running "vapor deploy" with Laravel Sail: docker: not found

Hello everyone,

I'm encountering an issue when trying to run a vapor deploy using Laravel Sail. I followed the standard setup to deploy my application, but when I execute the command, I get the following error:

In Process.php line 269:

  The command "docker build --pull --file=staging.Dockerfile --tag=management:staging --build-arg='__VAPO
  R_RUNTIME=docker' ." failed.

  Exit Code: 127 (Command not found)

  Working directory: /var/www/html/.vapor/build/app

  Output:
  ================


  Error Output:
  ================
  sh: 1: docker: not found

Here's my staging.Dockerfile:

FROM laravelphp/vapor:php83

RUN apk --update add ffmpeg

COPY ./php.ini /usr/local/etc/php/conf.d/overrides.ini

COPY . /var/task

I'm working in a Windows + WSL + Ubuntu 22.04 development environment. It seems like the issue is related to the docker command not being found in the environment where the deploy is running. I've checked my setup, and everything seems to be in order, so I'm unsure why docker isn't available.

Has anyone encountered this issue before, or does anyone have any suggestions on how to resolve it?

Thanks in advance for your help!

0 likes
3 replies
puklipo's avatar

The vapor cli runs on WSL or CI.

It does not run inside a Sail container.

XedinUnknown's avatar

If I've got PHP, Composer, and the whole Laravel application in Docker - why would I use PHP on the host to run Vapor? That defeats the point of Docker. I already run Vapor Deploy from that same container. I just need the login session to persist.

For me, I can see a ~/.laravel-vapor/config.json being created on vapor login, with the right details. Yet when I run vapor log - it asks me to log in again. That's what needs solving, not where you run Vapor from.

Please or to participate in this conversation.