Giter VIP home page Giter VIP logo

docker-php's Introduction

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

How to use

  • 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"

image

Add Xdebug

References

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

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

docker-php's People

Contributors

dinhquochan avatar pnlinh avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.