Giter Club home page Giter Club logo

php-docker's Introduction

Lumen/Laravel PHP & Composer Docker

Docker scripts to create lightweight PHP (FPM) and Composer images with Laravel >=5.6 extensions

  • The images are based on PHP FPM alpine images. Extensions included:
    • BCMath
    • PDO MySQL
    • Exif
    • GD Graphics library

Usage

Check latest available version here

  1. PHP base image docker pull mimidots/php7.4:<version>
  2. PHP composer image docker pull mimidots/composer:<version>

Building

  1. Build the PHP base image first
docker build -t x/xxx:xx docker_file_path

where

  • x/xxx:xx is the image tag e.g. demo/php7.4-alpine:latest
  • docker_file_path is the path to the Dockerfile e.g. ./php7.4/Dockerfile
  1. Build a composer image utilizing above PHP image as a base.
docker build --build-arg x/xxx:xx  -t y/yyy:xx ./composer/Dockerfile

where

  • xxx.xx.xx is PHP image tag from step 1 above
  • y/yyy:xx is a tag for the composer image

Example/Demo utilizing the PHP base image

A docker-compose demo available in the example folder.

  • cd to the example folder cd example
  • Start the docker services IMAGE=x/xxx:xx docker-compose up where x/xxx:xx is PHP image tag
  • Visit your browser at http://localhost:8000

php-docker's People

Contributors

0xmurage avatar semantic-release-bot 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.