Simple docker image for PHP/Laravel development. This is a folk from pnlinh/docker-php.
- 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 8.0
- PHP 8.1 (recommend usage)
- PHP 8.2 (recommend usage)
- PHP 8.3
- Build image
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
VERSION=8.3 make build # Build image with php 8.3
- How to customize image name
VERSION=8.0 IMAGE=archielite/laravel:php make build # Build image with php 8.0
VERSION=8.1 IMAGE=archielite/laravel:php make build # Build image with php 8.1
VERSION=8.2 IMAGE=archielite/laravel:php make build # Build image with php 8.2
VERSION=8.3 IMAGE=archielite/laravel:php make build # Build image with php 8.3
- Test image by PHP version
VERSION=8.3 make test
VERSION=8.2 make test
VERSION=8.1 make test
VERSION=8.0 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 dinhquochan/laravel:php8.1
- Using docker-compose
version: '3.4'
services:
app:
image: dinhquochan/laravel:php8.1
hostname: laravel-app
container_name: laravel-app
ports:
- "80:80"
volumes:
- .:/var/www/html
networks:
- localnet
networks:
localnet:
driver: "bridge"
- Browser to: http://localhost
- https://github.com/pnlinh/docker-php
- https://github.com/TrafeX/docker-php-nginx
- https://bolshov.online/docker/2020/11/18/runit-vs-supervisor
- https://stackoverflow.com/questions/67231714/how-to-add-trusted-root-ca-to-docker-alpine/67232164#67232164
If you discover any security related issues, please email contact@dinhquochan.com instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.