Public | Automated Build

Last pushed: a year ago
Short Description
A container that contains nginx & PHP 56 (both compiled from source) and running with systemd
Full Description

This is a container that contains a base Nginx and PHP 5.6 (both compiled from source) server. It uses systemd from my base CentOS7 Systemd repository

The idea is to use this a s abase then overwrite the nginx.conf file with your own so that you can load other sites etc, it is located in /etc/nginx/nginx.conf

To start this container use:
docker run --privileged -ti -v /sys/fs/cgroup:/sys/fs/cgroup:ro -p 80:80 <image_name>

This is generally best for "simple" applications that don't use a framework, I had trouble getting the server to work when re-directing everything to a single index.php file.


Nginx is compiled with the /etc/nginx prefix just to keep everything contained in a single location, for the moment the nginx.conf file sets up a basic server using /etc/nginx/html as the document root and a PHP socket to run.
Nginx does not contain the proxy module, it seemed unnecessary in the context of this little web container.

PHP 5.6

PHP is also compiled with the prefix /etc/php5.6 to keep everthing together but there are some differences:
php.ini is located in /etc/php.ini
PHP is built with PHP-fpm and uses sockets for everything

The php ini file contains the Europe/London Timezone and has a cgi variable set to 1, or is it 0. I need to check this

Docker Pull Command
Source Repository

Comments (0)