Sign inSign up

pnlinh/laravel

By pnlinh

•Updated about 1 year ago

Simple docker image for PHP/Laravel development

Image
0

5.7K

pnlinh/laravel repository overview

⁠Docker PHP-FPM & Nginx base on Alpine Linux

Simple docker image for PHP/Laravel development

⁠Why should use this image
  • Built on the lightweight and secure Alpine Linux⁠ distribution
  • Multi-platform, supporting AMD4, ARMv6, ARMv7, ARM64
  • Use runit⁠ instead of supervisor⁠
  • Very small Docker image size
⁠PHP version support
  • PHP 7.2
  • PHP 7.4
  • PHP 8.0
  • PHP 8.1 (recommend usage)
  • PHP 8.2 (recommend usage)
⁠How to use
  • Build image
VERSION=7.2 make build # Build image with php 7.2
VERSION=7.4 make build # Build image with php 7.4
VERSION=8.0 make build # Build image with php 8.0
VERSION=8.1 make build # Build image with php 8.1
VERSION=8.2 make build # Build image with php 8.2
  • Test image by PHP version
VERSION=8.2 make test
VERSION=8.1 make test
VERSION=8.0 make test
VERSION=7.4 make test
VERSION=7.2 make test
  • Test all image
make test-all
  • Mount your code to be served with container
docker run --name=app -v /path/to/project:/var/www/html -p 80:80 pnlinh/laravel:php8.1
  • Using docker-compose
version: '3.4'

services:
    app:
        image: pnlinh/laravel:php8.1
        hostname: laravel-app
        container_name: laravel-app
        ports:
            - "80:80"
        volumes:
            - .:/var/www/html
        networks:
            - localnet
networks:
    localnet:
        driver: "bridge"

image

⁠Add Xdebug
⁠Useful images
⁠References

Tag summary

Content type

Image

Digest

sha256:01008d6be…

Size

16.3 MB

Last updated

about 1 year ago

docker pull pnlinh/laravel:php7.2