8000 GitHub - pnlinh/docker-php at fca90a013600e6e7486bedb88fb68c2520976ac0
[go: up one dir, main page]

Skip to content

pnlinh/docker-php

Repository files navigation

Docker PHP-FPM & Nginx base on Alpine Linux

Simple docker image for Symfony 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 (todo)

How to use

  • Build image
./build php7.2 # Build image with php 7.2
./build php7.4 # Build image with php 7.4
./build php8.0 # Build image with php 8.0
./build php8.1 # Build image with php 8.1
  • Build for Symfony 3 with PHP 7.4
docker build --no-cache -f php7.4.symfony-3.Dockerfile . -t pnlinh/symfony:3-php7.4
  • Mount your code to be served with container
docker run --name=app -v /path/to/project:/var/www/html -p 80:80 pnlinh/symfony:php8.1
  • With docker-compose
version: '3.4'

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

image

Useful images

References

Releases

No releases published

Packages

 
 
 

Contributors 2

  •  
  •  
0