Dockerize Laravel with One Line Code

Dockerize Laravel with One Line Code

Just one-line code: $sudo ./, you can execute the Laravel application in LNMP(Linux, Nginx, Mysql, PHP) environment.

  • The tutorial works for Mac M1


Quick Start

  1. Clone the repository: $ git clone
  2. Enter the directory root you just cloned: $ cd laravel-docker
  3. Execute the file as admin: $ sudo ./ If it executes successfully, you will the following msg in terminal: $ App is running.
  4. Now, open browser and go to localhost:8000, you will see Laravel homepage.
  • Shut down all the containers started above, execute sudo docker-compose down in the same directory root

Thanks to the project: docker-compose-laravel-alpine-for-mac-m1, I built the project based on it.