Public | Automated Build

Last pushed: 6 months ago
Short Description
Simple docker for a simple nginx with php5 app
Full Description

docker-nginx-php-fpm

Simple docker for symfony projects.
Based on nginx and php-fpm
Support for bash-profile
Support for symfony manager

Raw usage with php5-fpm

Use the php5-fpm version

pull image from docker hub

php5-fpm

$  docker build -f Dockerfile.php5 -t "houseofagile/docker-nginx-php-fpm:php5" .

php7.0-fpm

$  docker build -f Dockerfile.php7 -t "houseofagile/docker-nginx-php-fpm:php7" .

How to launch a docker instance with nginx and php-fpm

Use either docker compose or Dockerfile to configure your docker instance, here is a simple example :

FROM houseofagile/docker-nginx-php-fpm:php5

MAINTAINER Meillaud Jean-Christophe (jc@houseofagile.com)

EXPOSE 80
CMD ["/sbin/my_init"] 

Build your docker image:

docker build -t "someorg/someproject:v1" .

You could add some postinstall scripts to customize your image to your need, basically it only provide a base phusion image with php5-fpm and nginx.

As google told us we need to have ssl everywhere, thanks to letsencrypt we have it. Usually you want to provide SSL within your new docker instance, using jwilder proxy and jrcs letsencrypt companion makes this easy.

Use it behind jwilder proxy and jrcs letsencrypt companion

PROJECT_NAME=someproject DOMAIN_NAMES="www.awesomedomain.com,amazingotherdomain.xyz" && docker run -e VIRTUAL_HOST="$DOMAIN_NAMES" -e LETSENCRYPT_HOST="$DOMAIN_NAMES" -e LETSENCRYPT_EMAIL="jc@houseofagile.com" -h $PROJECT_NAME --name $PROJECT_NAME -d -P someorg/someproject:v1

You should be able to connect with:

docker exec -it someproject bash
Docker Pull Command
Owner
houseofagile

Comments (0)