Skip to content

Docker image for local development with Laravel 5.5 projects, based on the official php7 image.

License

Notifications You must be signed in to change notification settings

otherguy/docker-laravel-dev

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Laravel 5.5 Development Image

Docker image for local development with Laravel 5.5 projects, based on the official PHP 7 image.

Find it on Dockerhub.

$ docker pull winternight/docker-laravel-dev:latest

Motivation

I use zeit.co and hyper.sh for dev deployments that need to be accessible to clients. For Laravel-based applications, a Docker image is necessary since hyper.sh is made specifically for Docker and zeit.co only natively support NodeJS.

I'm not a fan of huge containers that bundle Apache, PHP, MySQL and other applications into one but I also do not want a complicated multi-container setup for a development-stage deployment because of the associated cost.

This image can be used as a simple base for your own Laravel development deployments. Here is a simple example:

FROM winternight/docker-laravel-dev:latest
COPY . /srv
RUN COMPOSER_ALLOW_SUPERUSER=1 composer install
RUN php artisan migrate:fresh --seed
RUN php artisan route:cache

Description

This is a docker image for an all-purpose PHPFPM (PHP Version 7.2) container. It is based on the 7.1-cli-alpine tag of the official PHP Docker image. Patch version upgrades are thus done automatically on build (e.g. 7.1.x to 7.1.y) but for minor version upgrades (e.g. 7.1.x to 7.2.x), a new Dockerfile should be created and tagged appropriately.

New and Removed Features

There are some new features and deprecated parts in PHP 7.2 that made changes to the Dockerfile necessary:

  • mcrypt has been deprecated in 7.1 and removed in 7.2 in favor of OpenSSL
  • xdebug is not yet supported with PHP 7.2 -- I will move the image to PHP 7.2 as soon as the final version is released

Extensions

The installed extensions are enough for local development of Laravel 5.5 projects.

Building

In order to build this image yourself, simply run the following command:

$ docker build -t winternight/docker-laravel-dev:latest .

About

Docker image for local development with Laravel 5.5 projects, based on the official php7 image.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •