Repository navigation
Expand file tree
/
Copy pathDockerfile
More file actions
55 lines (45 loc) · 2.1 KB
/
Copy pathDockerfile
File metadata and controls
55 lines (45 loc) · 2.1 KB
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
FROM centos:latest
RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm && \
yum install -y http://rpms.remirepo.net/enterprise/remi-release-7.rpm && \
yum install yum-utils && \
yum-config-manager --enable remi-php70 && \
yum update -y && \
yum install -y \
php70-php.x86_64 \
php70-php-bcmath.x86_64 \
php70-php-cli.x86_64 \
php70-php-common.x86_64 \
php70-php-devel.x86_64 \
php70-php-gd.x86_64 \
php70-php-intl.x86_64 \
php70-php-json.x86_64 \
php70-php-mbstring.x86_64 \
php70-php-mcrypt.x86_64 \
php70-php-mysqlnd.x86_64 \
php70-php-pdo.x86_64 \
php70-php-pear.noarch \
php70-php-xml.x86_64 \
php70-php-ast.x86_64 \
php70-php-opcache.x86_64 \
php70-php-pecl-zip.x86_64 \
php70-php-pecl-memcached.x86_64 && \
ln -s /usr/bin/php70 /usr/bin/php && \
ln -s /etc/opt/remi/php70/php.ini /etc/php.ini && \
ln -s /etc/opt/remi/php70/php.d /etc/php.d && \
ln -s /etc/opt/remi/php70/pear.conf /etc/pear.conf && \
ln -s /etc/opt/remi/php70/pear /etc/pear
RUN yum install -y httpd-devel.x86_64 nano wget memcached git unzip
RUN curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer
RUN usermod -u 1000 apache && ln -sf /dev/stdout /var/log/httpd/access_log && ln -sf /dev/stderr /var/log/httpd/error_log
RUN unlink /etc/localtime && ln -s /usr/share/zoneinfo/Europe/London /etc/localtime
RUN rm /etc/httpd/conf.d/welcome.conf \
&& sed -i -e "s/Options\ Indexes\ FollowSymLinks/Options\ -Indexes\ +FollowSymLinks/g" /etc/httpd/conf/httpd.conf \
&& sed -i "s/\/var\/www\/html/\/var\/www/g" /etc/httpd/conf/httpd.conf \
&& echo "FileETag None" >> /etc/httpd/conf/httpd.conf \
&& sed -i -e "s/expose_php\ =\ On/expose_php\ =\ Off/g" /etc/php.ini \
&& sed -i -e "s/\;error_log\ =\ php_errors\.log/error_log\ =\ \/var\/log\/php_errors\.log/g" /etc/php.ini \
&& echo "ServerTokens Prod" >> /etc/httpd/conf/httpd.conf \
&& echo "ServerSignature Off" >> /etc/httpd/conf/httpd.conf
WORKDIR /var/www
COPY ./httpd.sh /httpd.sh
CMD "/httpd.sh"