/
Dockerfile
43 lines (31 loc) · 1.02 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
FROM ubuntu:14.04
LABEL maintainer="Mark Sutherland <mark.sutherland@epfl.ch>"
USER root
RUN apt-get update && apt-get install -y \
build-essential \
git \
nginx \
php5 php5-gd \
php5-mysql php5-curl \
php5-fpm php5-memcache
# Increase the open file limit
COPY files/limits.conf.append /tmp/
RUN cat /tmp/limits.conf.append >> /etc/security/limits.conf && rm -f /tmp/limits.conf.append
# Checkout the Elgg installation
COPY files/elgg_installation /usr/share/nginx/html/elgg
WORKDIR /usr/share/nginx/html
# Copy over the settings.php
COPY files/settings.php elgg/engine/settings.php
# Make the Elgg data directory
RUN mkdir /elgg_data
RUN chmod a+rw /elgg_data
# Copy over the Nginx Server configuration
COPY files/nginx_sites_avail.append /tmp/
RUN cat /tmp/nginx_sites_avail.append >> /etc/nginx/sites-available/default
RUN service nginx restart
RUN service php5-fpm restart
ADD bootstrap.sh /etc/bootstrap.sh
RUN chown root:root /etc/bootstrap.sh
RUN chmod 700 /etc/bootstrap.sh
EXPOSE 8080
CMD ["/etc/bootstrap.sh", "-d"]