ljubadr / docker-laravel

A docker Compose file for Laravel development

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Laravel docker container

This is a Docker multi-container for the Laravel PHP Framework. The Compose file provides the following services:

  • Nginx + PHP7 + FPM container vcarreira/nginx-php7-fpm
  • Redis container vcarreira/redis
  • Official MySQL container
  • Built-in MySQL backup container
  • Built-in Adminer container
  • Built-in queue:listen daemon

The following one-off containers are provided for the common Laravel tasks:

Setup

To simplify the process of dockerizing a Laravel webapp you can use the yeoman docker-laravel generator based on this repo. The Git repository has detailed instructions on how to run the generator and a series of 5 videos that show each container working.

Important notes:

  • Version 1.7 or greater of docker-compose is required because the Compose file reads environment variables from the .env file
  • On Windows or OSX you must use the native Docker app (Docker for Windows or Docker for Mac)

Size

To provide consistency all images (except the official ones) are based on debian:jessie. All PHP related containers are based on the same PHP 7 container. The rational behind this is to guarantee that the development and test environment are the same as the one used for the Nginx container.

Size of each image:

vcarreira/nginx-php7-fpm   599 MB
vcarreira/redis            183 MB

Related images

Credits

Must of this work is based on:


👌 Happy Coding.

If you have any feedback or questions, feel free to contact me on Twitter with @vcarreira or email with vitor.carreira@gmail.com.

About

A docker Compose file for Laravel development


Languages

Language:Shell 100.0%