Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel Sail is shutting down old Sail processes on every sail command

I just started using Laravel Sail (v1.4.7) and if I run this:

sail up -d

Then all container started.

Then I try run this:

sail composer dump-autoload

And the response is:

projectname-               docker-              Exit 1
Shutting down old Sail processes...
Sail is not running.

You may Sail using the following commands: './vendor/bin/sail up' or './vendor/bin/sail up -d'

I tried to run composer dump-autoload without sail, and it's working fine. But this isn't run inside the container (so maybe it'll run on different versions in the future).

UPDATE:

I run my containers in WSL2, Ubuntu 20.04.

Why shutting down containers at this point? But actually not just this command occurs shut down. Every sail ... command occurs the same.

Any idea?

like image 510
netdjw Avatar asked Nov 06 '22 02:11

netdjw


1 Answers

If any containers in your docker-compose.yml file in the root of your project do not start properly for any reason, then Laravel Sail will do this. The solution is to make sure all containers start. The reason for a container not starting would be a separate question since there is a multitude of reasons why this could happen.

Try commenting out the service of a failing container in docker-composer.yml to confirm this is the problem.

like image 141
Jason Avatar answered Dec 04 '22 04:12

Jason