ucan-lab / docker-laravel

🐳 Build a simple laravel development environment with Docker Compose.
https://dev.to/ucan_lab/how-to-install-and-set-up-laravel-s-local-development-environment-with-docker-compose-5bcf
MIT License
1.17k stars 380 forks source link

schema:dump command cannot be executed #236

Closed ucan-lab closed 9 months ago

ucan-lab commented 9 months ago
$ php artisan schema:dump
sh: 1: mysqldump: not found
sh: 1: mysqldump: not found
sh: 1: mysqldump: not found

   Symfony\Component\Process\Exception\ProcessFailedException

  The command "mysqldump  --user="${:LARAVEL_LOAD_USER}" --password="${:LARAVEL_LOAD_PASSWORD}" --host="${:LARAVEL_LOAD_HOST}" --port="${:LARAVEL_LOAD_PORT}" --no-tablespaces --skip-add-locks --skip-comments --skip-set-charset --tz-utc "${:LARAVEL_LOAD_DATABASE}" --routines --result-file="${:LARAVEL_LOAD_PATH}" --no-data" failed.

Exit Code: 127(Command not found)

Working directory: /workspace

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

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

  at vendor/symfony/process/Process.php:269
    265▕      */
    266▕     public function mustRun(callable $callback = null, array $env = []): static
    267▕     {
    268▕         if (0 !== $this->run($callback, $env)) {
  ➜ 269▕             throw new ProcessFailedException($this);
    270▕         }
    271▕
    272▕         return $this;
    273▕     }

      +17 vendor frames

  18  artisan:35
      Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))