DEV Community

Cover image for How to run Laravel using Docker

How to run Laravel using Docker

Kyle Parisi on July 13, 2018

Laravel has official documentation for running laravel locally here. The documentation doesn't touch on how to use docker. Laradock is a good sol...
Collapse
 
mradom profile image
Omar Mrad • Edited

Hello Kyle, your publication was very useful for me, the docker-compose it's very simple. But I have a little issue, when I try to run php artisan migrate from app, I get error. I tried to add links inside app configuration, but I get the same error. I attach the a screenshot, I'll appreciate your help. Regards

Screenshot

Collapse
 
kyleparisi profile image
Kyle Parisi

Your .env file is wrong. it's trying to connect to 127.0.0.1 in the container which it shouldn't be. If you are using the compose file the details are in the env file above.

Collapse
 
mradom profile image
Omar Mrad

Thanks is working fine now... Regards!