forked from sorrell/docker-tao-web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
59 lines (43 loc) · 1.4 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
FROM php:7.0.5-apache
MAINTAINER Nick Sorrell <[email protected]>
ARG TAO_SERVER_NAME
ENV TAO_SERVER_NAME=$TAO_SERVER_NAME
RUN export DEBIAN_FRONTEND=noninteractive
ENV DEBIAN_FRONTEND noninteractive
RUN dpkg-divert --local --rename --add /sbin/initctl
# Use local cached debs from host (saves your bandwidth!)
# Change ip below to that of your apt-cacher-ng host
# Or comment this line out if you do not wish to use caching
ADD 71-apt-cacher-ng /etc/apt/apt.conf.d/71-apt-cacher-ng
RUN apt-get -y update && \
apt-get install -y \
curl \
libcurl4-gnutls-dev \
libpng-dev \
libpq-dev \
libxml2-dev \
libtidy-dev \
unzip \
mc
RUN docker-php-ext-install -j$(nproc) \
curl \
gd \
pdo_pgsql \
zip \
tidy \
xml
RUN a2enmod rewrite
ADD http://releases.taotesting.com/TAO_3.1.0-RC7_build.zip /tmp/TAO_3.1.0-RC7_build.zip
ADD https://github.com/mathjax/MathJax/archive/2.7.0.zip /tmp/2.7.0.zip
WORKDIR /tmp
RUN unzip -q TAO_3.1.0-RC7_build.zip; \
mv TAO_3.1.0-RC7_build web; \
mv web /home/; \
unzip -q 2.7.0.zip; \
mv MathJax-2.7.0/* /home/web/taoQtiItem/views/js/mathjax/; \
chown -R www-data.www-data /home/web
ADD apache.conf /etc/apache2/sites-enabled/000-default.conf
RUN sed -i -e "s/TAO_SERVER_NAME/${TAO_SERVER_NAME}/g" /etc/apache2/sites-enabled/000-default.conf
ADD php.ini /usr/local/etc/php/
EXPOSE 80
CMD ["/usr/sbin/apachectl", "-D", "FOREGROUND"]