Home > OS >  Can't start a simple docker with laravel on a new Ubuntu
Can't start a simple docker with laravel on a new Ubuntu

Time:08-24

I just get a new computer with a new Ubuntu.

So I decide to create a new project with Laravel. I copy my old docker-compose with sail and redis, but I always get this error while my docker ps is empty

enter image description here

enter image description here

CodePudding user response:

As the error mentions the port 3306 is already in use on your pc so the mysql container can not start and your laravel container depends on it.

You can check what is using this port and stop it.

Or change the port in your composer file to something else (like 3307)

ports:
    - '3307:3306'

and adjust it in the .env file as well.

  • Related