-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
61 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,19 +4,32 @@ | |
############################################################ | ||
|
||
# Set the base image to Ubuntu | ||
FROM centos:latest | ||
|
||
# File Author / Maintainer | ||
MAINTAINER Kaushal Kishore <[email protected]> | ||
|
||
# Add the ngix and PHP dependent repository | ||
ADD nginx.repo /etc/yum.repos.d/nginx.repo | ||
FROM centos:7 | ||
|
||
ENV nginxversion="1.12.2-1" \ | ||
os="centos" \ | ||
osversion="7" \ | ||
elversion="7_4" | ||
# Installing nginx | ||
RUN yum -y install nginx | ||
RUN yum install -y wget openssl sed &&\ | ||
yum -y autoremove &&\ | ||
yum clean all &&\ | ||
wget http://nginx.org/packages/$os/$osversion/x86_64/RPMS/nginx-$nginxversion.el$elversion.ngx.x86_64.rpm &&\ | ||
rpm -iv nginx-$nginxversion.el$elversion.ngx.x86_64.rpm | ||
|
||
# forward request and error logs to docker log collector | ||
RUN ln -sf /dev/stdout /var/log/nginx/access.log \ | ||
&& ln -sf /dev/stderr /var/log/nginx/error.log | ||
|
||
# Installing PHP | ||
RUN yum -y --enablerepo=remi,remi-php56 install nginx php-fpm php-common | ||
RUN rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm && rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm | ||
RUN yum -y install php56w php56w-cli php56w-common php56w-fpm \ | ||
yum -y autoremove &&\ | ||
yum clean all | ||
# Installing PHP | ||
RUN yum -y install php56w-bcmath php56w-dba php56w-devel php56w-embedded php56w-enchant php56w-gd php56w-imap php56w-interbase php56w-intl php56w-ldap php56w-mbstring php56w-mcrypt php56w-mssql php56w-mysql php56w-odbc php56w-opcache php56w-pdo php56w-pecl-apcu php56w-pecl-apcu-devel php56w-pecl-gearman php56w-pecl-geoip php56w-pecl-igbinary php56w-pecl-igbinary-devel php56w-pecl-imagick php56w-pecl-imagick-devel php56w-pecl-libsodium php56w-pecl-memcache php56w-pecl-memcached php56w-pecl-mongodb php56w-pecl-redis php56w-pecl-xdebug php56w-pgsql php56w-phpdbg php56w-process php56w-pspell php56w-recode php56w-snmp php56w-soap php56w-tidy php56w-xml php56w-xmlrpc \ | ||
yum -y autoremove &&\ | ||
yum clean all | ||
|
||
# Installing supervisor | ||
RUN yum install -y python-setuptools | ||
|
@@ -33,7 +46,7 @@ ADD supervisord.conf /etc/ | |
|
||
# Adding the default file | ||
ADD index.php /var/www/index.php | ||
|
||
ADD php-fpm.conf /etc/php-fpm.conf | ||
# Set the port to 80 | ||
EXPOSE 80 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
; This file was initially adapated from the output of: (on PHP 5.6) | ||
; grep -vE '^;|^ *$' /usr/local/etc/php-fpm.conf.default | ||
|
||
[global] | ||
|
||
error_log = /proc/self/fd/2 | ||
daemonize = no | ||
|
||
[www] | ||
|
||
; if we send this to /proc/self/fd/1, it never appears | ||
access.log = /proc/self/fd/2 | ||
|
||
user = apache | ||
group = apache | ||
|
||
listen = [::]:9000 | ||
|
||
pm = dynamic | ||
pm.max_children = 5 | ||
pm.start_servers = 2 | ||
pm.min_spare_servers = 1 | ||
pm.max_spare_servers = 3 | ||
|
||
clear_env = no |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters