-
-
Notifications
You must be signed in to change notification settings - Fork 105
/
Copy pathDockerfile
44 lines (32 loc) · 1.12 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
FROM tutum/lamp
RUN apt-get update -q -y && \
apt-get upgrade -q -y && \
apt-get install -q -y curl php5-gd php5-ldap php5-imap sendmail php5-pgsql php5-curl && \
apt-get clean && \
php5enmod imap
RUN chown www-data:www-data /var/lib/php5
ADD apache_default /etc/apache2/sites-available/000-default.conf
ADD start.sh /
ADD run.sh /
RUN chmod +x /start.sh && \
chmod +x /run.sh
ENV LIMESURVEY_VERSION="3.17.0+190402"
RUN apt-get update -q -y && \
apt-get upgrade -q -y
RUN rm -rf /app && \
git clone https://github.com/LimeSurvey/LimeSurvey.git && \
cd LimeSurvey && git checkout ${LIMESURVEY_VERSION} && cd .. && \
rm -rf /LimeSurvey/.git && \
mv LimeSurvey app && \
mkdir -p /app/upload/surveys && \
mkdir -p /uploadstruct && \
chown -R www-data:www-data /app && \
cp -a /app/upload/* /uploadstruct
SHELL ["/bin/bash", "--login", "-c"]
RUN versions=(${LIMESURVEY_VERSION//+/ }) && \
version=${versions[1]} && \
sed -r -i "s/(config\['buildnumber'\] = ')(.*)('\;$)/\1${version}\3/g" /app/application/config/version.php
VOLUME /app/upload
VOLUME /app/plugins
EXPOSE 80 3306
CMD ["/start.sh"]