Laravel5.8の説明は公式のドキュメントにあったので、8に合わせたサンプルアプリ
nginx-php-fpm のイメージをlocalのPHPバージョンに近いものに合わせました。
- localのsail環境 PHP Version 8.1.10
- nginx-php-fpm PHP Version 8.1.12
./Dockerfile
- FROM richarvey/nginx-php-fpm:1.7.2
+ FROM richarvey/nginx-php-fpm:latest
COPY . .
# 省略
その他はドキュメント通りです。