Fail at running sail:publish command in Sail Laravel 9

193 Views Asked by At

I'm trying to create a dockerfile file to run xdebug but when I'm trying to run sail artisan sail:publish I've got this

   INFO  Publishing [sail-docker] assets.  


   League\Flysystem\UnableToCreateDirectory 

  Unable to create a directory at /var/www/html/docker/.

  at vendor/league/flysystem/src/UnableToCreateDirectory.php:20
     16▕ 
     17▕     public static function atLocation(string $dirname, string $errorMessage = '', ?Throwable $previous = null): UnableToCreateDirectory
     18▕     {
     19▕         $message = "Unable to create a directory at {$dirname}. {$errorMessage}";
  ➜  20▕         $e = new static(rtrim($message), 0, $previous);
     21▕         $e->location = $dirname;
     22▕ 
     23▕         return $e;
     24▕     }

      +31 vendor frames 
  32  artisan:37
      Illuminate\Foundation\Console\Kernel::handle()

image

I've tried this so far sudo chown -R $USER:$USER ./vendor/ sudo chmod -R 755 /var/www/storage sudo chmod 777 docker-compose.yml -Rf

0

There are 0 best solutions below