Dockerize a Laravel App with a single command.
Install Laravel App (or push with a laravel container):
$ composer create-project --prefer-dist laravel/laravel <app-name>
Clone the repository on your laravel path:
$ git clone https://github.com/fsenaweb/docker-laravel.git
Move the files in docker-laravel directory to Laravel path:
$ cd docker-laravel && mv * ../ && cd .. && rm -rf docker-laravel
Next run the docker-compose command:
$ docker-compose up -d
First, this command will build the containers. Then it will install all the necessary dependencies and start the development server. The development environment will be available on either http://localhost:8000 (or in other port that you will configure). You can on your Docker Machine IP (http://192.168.99.100 by default) depending on your operating system. For access in PHPMyAdmin, will be availabe in http://localhost:8080 and use the credencials in docker-compose.yml .
After using the docker-compose up -d
command, just simply access the page at localhost: 8000
and use the start using your application.
- Execute a container:
docker exec -it {CONTAINER_ID} bash
Make your contribution. If you're interested, send a pull request of your code and we'll help you have access to a simple system and help small developers manage their containers more easily.