/
Dockerfile
56 lines (34 loc) · 1.73 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
##########
# piwik installation
##########
# Set the base image for this installation
FROM centos:6.6
#File Author / Maintainer
MAINTAINER bajaj ritesh.bajaj6@gmail.com
#Pre-reqs
RUN yum clean all && \
yum -y update && \
yum -y install httpd mod_rewrite mod_ssl mod_env php php-common php-cli php-mysql mysql-server unzip && \
rm -fr /var/cache/*
#Files that need to be added
ADD mysql_setup.sql /tmp/
ADD piwik.conf /etc/httpd/conf.d/
#install wget package
RUN yum -y install wget
#Application installation
RUN wget -P /var/www/html/ http://builds.piwik.org/piwik.zip && \
unzip /var/www/html/piwik.zip -d /var/www/html/ && \
rm -fr /var/www/html/piwik.zip
#for service command install
#
#
RUN service mysqld start && \
mysql < /tmp/mysql_setup.sql && \
rm -fr /tmp/mysql_setup.sql* && \
service mysqld stop
#Expose Necessary Ports
EXPOSE 80
#give permission to apache user
RUN chown -R apache:apache /var/www/html/piwik
#INSTALL php-mbstring for piwik
RUN yum install php-mbstring