LaraDock is a Laravel Homestead like development environment but for Docker instead of Vagrant. https://github.com/LaraDock/laradock
*Requires Git and Docker
Clone the LaraDock repository:
A. If you already have a Laravel project, clone this repository on your Laravel root directory:
git submodule add https://github.com/LaraDock/laradock.git
B. If you don't have a Laravel project, and you want to install Laravel from Docker, clone this repo anywhere on your machine:
git clone https://github.com/LaraDock/laradock.git
Run Containers: (Make sure you are in the laradock folder before running the docker-compose commands).
Example: Running NGINX and MySQL: docker-compose up -d nginx mysql
There are a list of available containers you can select to create your own combinations.
nginx
, hhvm
, php-fpm
, mysql
, redis
, postgres
, mariadb
, neo4j
, mongo
, apache2
, caddy
, memcached
, beanstalkd
, beanstalkd-console
, workspace
Enter the Workspace container, to execute commands like (Artisan, Composer, PHPUnit, Gulp, ...).
docker-compose exec workspace bash
If you don't have a Laravel project installed yet, follow the step to install Laravel from a Docker container.
a. Enter the Workspace container.
b. Install Laravel. composer create-project laravel/laravel my-cool-app "5.3.*"
Edit the Laravel configurations. Open your Laravel's .env file and set the DB_HOST to your mysql:
DB_HOST=mysql
Open your browser and visit your localhost address.