forked from cakephp/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy.Dockerfile
42 lines (29 loc) · 1004 Bytes
/
deploy.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
FROM debian:jessie
ENV DEBIAN_FRONTEND noninteractive
LABEL Description="This image is used to create an environment to contribute to the cakephp/docs"
RUN apt-get update && apt-get install -y \
python-pip \
texlive-latex-recommended \
texlive-latex-extra \
texlive-fonts-recommended \
texlive-lang-all \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN apt-get update \
&& apt-get install -y nginx curl php5 php5-curl \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt /tmp/
RUN pip install -r /tmp/requirements.txt
WORKDIR /data
COPY . /data
RUN make website
RUN rm -rf /var/www/html/* \
&& mkdir -p /var/www/html/3.0/ \
&& cp -a /data/website/. /var/www/html/3.0/ \
&& mv /data/nginx.conf /etc/nginx/sites-enabled/default
# forward request and error logs to docker log collector
RUN ln -sf /dev/stdout /var/log/nginx/access.log \
&& ln -sf /dev/stderr /var/log/nginx/error.log
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]