Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

mmickelson's avatar

Example-app doesn't run in docker

I tried following the steps in the Installation page of Laravel docs. The docker container starts up but composer install results in the following error:

Problem 1 - Root composer.json requires php ^8.1.0 but your php version (8.0.19) does not satisfy that requirement.

It appears the container provided doesn't satisfy the requirements of the dependencies... Is there a way to fix this so the container has the latest PHP version?

0 likes
2 replies
mmickelson's avatar

Interesting. The page you pointed me to states "Sail currently supports serving your application via PHP 8.2, 8.1, PHP 8.0, or PHP 7.4. The default PHP version used by Sail is currently PHP 8.2. " I see that in my docker-compose file but I got that error so something isn't right. When I open a terminal and use php -v, I get 8.0.19. Maybe this is because I'm not working inside the docker container when I use the terminal?? I feel like I need to learn a bunch more about docker before I can explore the example app...

Please or to participate in this conversation.