-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
32 lines (26 loc) · 1.3 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
FROM debian:latest
MAINTAINER Jan <[email protected]>
# Upgrade debian packages
RUN DEBIAN_FRONTEND=noninteractive apt-get update
RUN dpkg-divert --local --rename --add /sbin/initctl
RUN ln -sf /bin/true /sbin/initctl
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install ssh git drush screen mc nano curl pwgen vim-tiny python-setuptools \
apache2 mysql-server libapache2-mod-php5 php5-mysql php-apc php5-gd php5-curl php5-memcache memcached
RUN DEBIAN_FRONTEND=noninteractive apt-get autoclean
# Configuration changes
RUN sed -i -e '163,169s/AllowOverride None/AllowOverride All/' /etc/apache2/apache2.conf
RUN sed -i -e "s/Timeout\s*=\s*300/Timeout = 3600/g" /etc/apache2/apache2.conf
RUN sed -i -e "s/upload_max_filesize\s*=\s*2M/upload_max_filesize = 2G/g" /etc/php5/apache2/php.ini
RUN sed -i -e "s/post_max_size\s*=\s*8M/post_max_size = 2G/g" /etc/php5/apache2/php.ini
RUN sed -i -e "s/^bind-address/#bind-address/" /etc/mysql/my.cnf
RUN a2enmod rewrite vhost_alias
# Set up supervisor
RUN easy_install supervisor
ADD ./start.sh /start.sh
ADD ./foreground.sh /etc/apache2/foreground.sh
ADD ./supervisord.conf /etc/supervisord.conf
RUN mkdir -p /var/run/sshd
RUN mkdir -p /var/log/supervisor
RUN chmod 755 /start.sh /etc/apache2/foreground.sh
EXPOSE 22 80 3306 9001
CMD ["/bin/bash", "-c", "screen /start.sh"]