Skip to content

michieldewilde/docker-laravel-alpine

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Docker Container for Laravel 5.x with PHP7

This is a docker container for Laravel 5.x with composer installed. Alpine Linux base image its very small at ~75 MB. This image is made for running tests for laravel not serving it over a web servicer like Nginx. It is primarily being used to run unit tests on Wercker. Do have a look at the PHP7 version of this image.

Pull it from docker registry

To pull the docker image you can do it with:

docker pull geshan/laravel-alpine:php7

Usage

After pulling the image from docker registry, go into laravel project that has a composer.json. Then run the following commands to run php or composer:

docker run -v $(pwd):/var/www geshan/laravel-alpine "composer install --prefer-dist"

Lets say if you are have PHPUnit in your composer.json, you can run the following commands to run your tests:

docker run -v $(pwd):/var/www geshan/laravel-alpine "./vendor/bin/phpunit --version"
docker run -v $(pwd):/var/www geshan/php7-laravel-alpine "./vendor/bin/phpunit"

As base image

You can use it as a base image like below:

FROM geshan/laravel-alpine

//my docker image contents

About

Docker container for running tests for Laravel 5.x

Resources

Stars

Watchers

Forks

Packages

No packages published