-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
93 lines (77 loc) · 2.33 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
FROM centos:6
RUN \
yum -y update && \
yum -y install \
git \
httpd \
mod_perl \
nano \
rsync \
ruby \
vsftpd \
wget
RUN \
yum -y install ntp && \
rm -rf /etc/localtime && \
ln -s /usr/share/zoneinfo/EET /etc/localtime
RUN rpm -Uvh http://repo.webtatic.com/yum/el6/latest.rpm
RUN \
yum -y install \
php \
php-cli \
php-gd \
php-mysql \
php-mbstring \
php-devel \
php-pecl-memcache \
php-pspell \
php-snmp \
php-xmlrpc \
php-xml \
php-pear \
php-tidy
RUN \
yum -y install rubygems && \
gem install sass --no-rdoc --no-ri && \
gem install bundler --no-rdoc --no-ri
RUN \
yum -y install \
mysql-server \
mysql && \
chkconfig --levels 235 mysqld on
ENV \
LC_ALL=en_US.UTF-8 \
LANG=en_US.UTF-8
# -----------------------------------------------------------------------------
# Apache configuration fixes
# -----------------------------------------------------------------------------
RUN sed -i \
-e 's~^Timeout \(.*\)$~Timeout 120~g' \
-e 's~^#ServerName \(.*\)$~ServerName 0.0.0.0:80~g' \
-e 's~^DirectoryIndex \(.*\)$~DirectoryIndex index.html index.html.var index.php~g' \
-e 's~^#EnableSendfile \(.*\)$~EnableSendfile Off~g' \
-e 's~AllowOverride \(.*\)$~AllowOverride All~g' \
/etc/httpd/conf/httpd.conf
# -----------------------------------------------------------------------------
# PHP configuration fixes
# -----------------------------------------------------------------------------
RUN sed -i \
-e 's~^short_open_tag \(.*\)$~short_open_tag = On~g' \
-e 's~^max_execution_time \(.*\)$~max_execution_time = 300~g' \
-e 's~^memory_limit \(.*\)$~memory_limit = 512M~g' \
-e 's~^post_max_size \(.*\)$~post_max_size = 100M~g' \
-e 's~^enable_dl \(.*\)$~enable_dl = On~g' \
-e 's~^upload_max_filesize \(.*\)$~upload_max_filesize = 200M~g' \
-e "s~^upload_max_filesize = 200M$~upload_max_filesize = 200M\nmax_file_uploads = 200~g" \
/etc/php.ini
# -----------------------------------------------------------------------------
# MYSQL configuration fixes
# -----------------------------------------------------------------------------
RUN sed -i \
-e "s~^user=mysql$~user=mysql\nmax_allowed_packet=1073741824~g" \
/etc/my.cnf
EXPOSE 80
EXPOSE 3306
COPY docker-entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]