Skip to content

archielite/docker-php

 
 

Repository files navigation

Docker PHP-FPM & Nginx base on Alpine Linux

Simple docker image for PHP/Laravel development. This is a folk from pnlinh/docker-php.

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 8.1 (recommend usage)
  • PHP 8.2 (recommend usage)
  • PHP 8.3

How to use

  • Build image
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.1 IMAGE=botble/laravel:php make build # Build image with php 8.1
VERSION=8.2 IMAGE=botble/laravel:php make build # Build image with php 8.2
VERSION=8.3 IMAGE=botble/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
  • 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 archielite/laravel:php8.1
  • Using docker-compose
version: '3.4'

services:
    app:
        image: archielite/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

References

Security

If you discover any security related issues, please email contact@dinhquochan.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

About

Simple docker image for PHP development

Resources

License

Stars

Watchers

Forks

Languages

  • Dockerfile 59.1%
  • Shell 29.6%
  • Makefile 11.3%