Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/geshan/docker-laravel-alpine
Docker container for running tests for Laravel 5.x
https://github.com/geshan/docker-laravel-alpine
Last synced: about 1 month ago
JSON representation
Docker container for running tests for Laravel 5.x
- Host: GitHub
- URL: https://github.com/geshan/docker-laravel-alpine
- Owner: geshan
- Created: 2015-10-19T12:13:58.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-09-10T14:09:07.000Z (about 7 years ago)
- Last Synced: 2024-07-18T16:34:54.186Z (2 months ago)
- Size: 7.81 KB
- Stars: 9
- Watchers: 3
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
## Docker Container for Laravel 5.x with PHP7
This is a docker container for Laravel 5.x with composer installed.
[Alpine Linux](https://hub.docker.com/_/alpine/) 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](http://wercker.com/).
Do have a look at the [PHP7](https://github.com/geshan/docker-laravel-alpine/tree/php7-branch) version of this image.[![](https://images.microbadger.com/badges/image/geshan/laravel-alpine.svg)](https://microbadger.com/images/geshan/laravel-alpine "Get your own image badge on microbadger.com")
## 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/laravel-alpine:php7 "./vendor/bin/phpunit"
```## As base image
You can use it as a base image like below:
```
FROM geshan/laravel-alpine//my docker image contents
```