Laravel 壁球迁移错误 pg_dump 未找到

Laravel Squash Migrate Error pg_dump not found

我的 laravel 应用程序有 3 个容器(php-fpm、nginx、postgresql),我在 php 上执行命令 php artisan schema:dump ]-fpm 容器,我发现错误 pg_dump not found

我遇到过类似的问题,但 mysql。为我解决的是在我试图执行 php artisan schema:dump 命令的容器中安装 mysql-client(我在 Dockerfile 中添加了 RUN apt-get install -y mysql-client,然后我有重建所有容器)。我认为你需要做类似的事情,例如RUN apt-get install -y postgresql-client 在您的 Dockerfile 中。