You want to use docker and add it into your laravel project immediately? Add, yes add docker to your Laravel. And simply continue your development.
-
Clone the repository into your project
SSH:
git clone [email protected]:transprime-research/laravel-dockerizer.gitHTTP:
git clone https://github.com/transprime-research/laravel-dockerizer.git -
Cd into
laravel-dockerizerdirectory, and run the bash filesetup.shusing any bash command that fits your os
Common ones are
bash setup.shsh setup.sh./setup.sh# This usually require execution permission
After this docker-compose.yml, Dockerfile, and dockerizer.sh should already be moved to your project's directory.
Then cd .. (back) into your project, and run bash command against dockerizer.sh e.g sh dockerizer.sh.
After that go to localhost:8070
Feel free to delete
laravel-dockerizerdirectory or leave it ;)
-
You can also now run
docker-compose buildanddocker-compose up -dbutdockerizer.shalready packaged these commands for you. -
You can also edit these files also and change the configurations.
Please refer to Docker Documenation at: https://docs.docker.com/
Extra resource: https://www.howtoforge.com/dockerizing-laravel-with-nginx-mysql-and-docker-compose/
