Skip to content

Simple docker image for PHP development

Notifications You must be signed in to change notification settings

tuannda/docker-php

 
 

Repository files navigation

Docker PHP-FPM & Nginx base on Alpine Linux

Simple docker image for PHP/Laravel development

How to use

  • Build image
./build php7.2 # Build image with php 7.4
./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
  • 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
  • With 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

References

About

Simple docker image for PHP development

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dockerfile 65.8%
  • Shell 33.8%
  • Other 0.4%