Giter VIP home page Giter VIP logo

docker-httpd-php's Introduction

Apache winth PHP-FPM in a Docker with Supervisor (CentOS 7)

Build Status
GitHub Open Issues
Stars Fork
Docker Start Docker Pulls Docker Auto

Felling like supporting me in my projects use donate button. Thank You!

This is Docker Image with Apache + PHP-FPM combo using polinux/supervisor docker image as base.

For different PHP versions, look up different branches of this repository. On Docker Hub you can find them under different tags:

PHP Version Image Name Branch Status
7.2 polinux/httpd-php:php72 php-7.2 Build Status
7.1 polinux/httpd-php:php71 php-7.1 Build Status
7.0 polinux/httpd-php:php70 php-7.0 Build Status
5.6 polinux/httpd-php:php56 php-5.6 Build Status

This image have inotify installed and set to gracefuly reload when Apache config changes, including VHosts.

Default web directory is set to /var/www/html/. info.php is present in this image. just got to http://localhost/info.php

Multiple versions of php can be selected from tags in Docker Hub.

Common dev tools for web app development

  • Ruby 2.0, Bundler
  • NodeJS and NPM
  • NPM packages like gulp, grunt, bower, browser-sync

Packages installed (PHP mods)

  • php-fpm
  • php-gd
  • php-mbstring
  • php-mcrypt
  • php-pdo
  • ImageMagick
  • GraphicsMagick
  • gulp
  • grunt-cli
  • bower
  • browser-sync
  • node
  • ruby
  • bundler
  • memcached
  • redis
  • git

Environmental Variable (From polinux/httpd image)

Variable DefaultSettings Info
LOG_LEVEL info Specify log level Apache should when started. Apache Log Levels
DEFAULT_CONFIG true Use default config provided by Apache package - Change to false when using custom config

Usage

Basic

docker run \
  -d \
  --name httpd-php \
  -p 80:80 \
  polinux/httpd-php

Set log level to debug and php 7.1

docker run \
  -d \
  --name httpd-php \
  -p 80:80 \
  -e LOG_LEVEL="debug" \
  polinux/httpd-php:php71

Build

docker build -t polinux/httpd-php .

Docker troubleshooting

Use docker command to see if all required containers are up and running:

$ docker ps

Check logs of httpd-php server container:

$ docker logs httpd-php

Sometimes you might just want to review how things are deployed inside a running container, you can do this by executing a bash shell through docker's exec command:

docker exec -ti httpd-php /bin/bash

History of an image and size of layers:

docker history --no-trunc=true polinux/httpd-php | tr -s ' ' | tail -n+2 | awk -F " ago " '{print $2}'

Author

Przemyslaw Ozgo ([email protected])

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.