-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
59 lines (44 loc) · 1.7 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
############################################################
# Dockerfile to build Centos-LEMP installed Container
# Based on CentOS
############################################################
# Set the base image to CentOS
FROM centos:7
# File Author / Maintainer
MAINTAINER Fuseteam <[email protected]>
# Add the ngix and PHP dependent repository
ADD etc/nginx.repo /etc/yum.repos.d/nginx.repo
# Installing nginx
RUN yum -y install nginx
# Installing PHP
RUN yum -y install epel-release yum-utils
RUN yum -y install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
RUN yum -y --enablerepo=remi,remi-php73 install nginx php-fpm php-common
RUN yum -y --enablerepo=remi,remi-php73 install php-cli php-pear php-pdo php-mysqlnd php-pgsql php-gd php-mbstring php-mcrypt php-xml php-intl
RUN yum -y install unzip wget
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
RUN php composer-setup.php --install-dir=/usr/local/bin --filename=composer
# Installing supervisor
RUN yum install -y python-setuptools
#https://pip.pypa.io/en/latest/development/release-process/#python-2-support
RUN easy_install pip
RUN pip install supervisor
# Adding the configuration file of the nginx
ADD etc/nginx.conf /etc/nginx/nginx.conf
ADD etc/default.conf /etc/nginx/conf.d/default.conf
# Adding the configuration file of the php fpm
ADD etc/php-fpm.conf /etc/php-fpm.conf
ADD etc/php.ini /etc/php.ini
# Add MySQL utils
ADD run.sh /run.sh
RUN chmod 755 /*.sh
# Creating run directory php-fpm
RUN mkdir /run/php-fpm/
# Adding the configuration file of the Supervisor
ADD etc/supervisord.conf /etc/
# Adding the default file
ADD www /var/www
# Set the port to 80
EXPOSE 80
## Executing supervisord
CMD ["/run.sh"]