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.
To pull the docker image you can do it with:
docker pull geshan/laravel-alpine:php7
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"
You can use it as a base image like below:
FROM geshan/laravel-alpine
//my docker image contents