-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
49 lines (41 loc) · 1.24 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
# set the base image first
FROM warrantgroup/centos:7
# specify maintainer
MAINTAINER Andy Roberts <[email protected]>
# Install PHP and Apache httpd
RUN yum --setopt=tsflags=nodocs -y install \
curl \
git \
httpd \
php \
php-cli \
php-curl \
php-mysql \
php-xml \
php-pear \
php-pecl-apc \
&& rm -rf /var/cache/yum/* \
&& yum clean all
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
#
# Global Apache configuration changes
#
RUN sed -i \
-e 's~^ServerSignature On$~ServerSignature Off~g' \
-e 's~^ServerTokens OS$~ServerTokens Prod~g' \
-e 's~^#ExtendedStatus On$~ExtendedStatus On~g' \
-e 's~^DirectoryIndex \(.*\)$~DirectoryIndex \1 index.php~g' \
-e 's~^NameVirtualHost \(.*\)$~#NameVirtualHost \1~g' \
/etc/httpd/conf/httpd.conf
#
# Global PHP configuration changes
#
RUN sed -i \
-e 's~^;date.timezone =$~date.timezone = Europe/London~g' \
-e 's~^;user_ini.filename =$~user_ini.filename =~g' \
/etc/php.ini
# Configure /app folder with sample app
COPY index.html /usr/share/httpd/noindex/index.html
VOLUME ["/var/www/html"]
EXPOSE 80
CMD /usr/sbin/httpd -c "ErrorLog /dev/stdout" -DFOREGROUND