-
Notifications
You must be signed in to change notification settings - Fork 7
/
Dockerfile-DOI
49 lines (33 loc) · 1.12 KB
/
Dockerfile-DOI
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
FROM debian:stretch
ARG config
ARG ref
ARG thumbnail
RUN apt-get update && apt-get install -y \
python3-pip \
nginx-light \
curl \
apt-transport-https \
git \
libfontconfig
COPY . /app
WORKDIR /app
RUN cp DOIRootCA2.cer /etc/ssl/certs/DOIRootCA2.pem \
&& cat DOIRootCA2.cer >> /etc/ssl/certs/ca-certificates.crt
RUN cp nginx.conf /etc/nginx
RUN cp $config instance/config.py
RUN cp $ref instance/reference.json
RUN rm -f /etc/apt/sources.list.d/chris-lea-node_js-jessie.list \
&& curl --cacert DOIRootCA2.cer https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - \
&& echo 'deb https://deb.nodesource.com/node_6.x jessie main' > /etc/apt/sources.list.d/nodesource.list \
&& apt-get update \
&& apt-get install -y nodejs
RUN pip3 --cert /app/DOIRootCA2.cer install -r requirements.txt
RUN npm config set cafile "/app/DOIRootCA2.cer" \
&& npm update
RUN node_modules/bower/bin/bower install --allow-root
ENV THUMBNAIL=$thumbnail
RUN python3 run.py --freeze --norun
RUN if $thumbnail -eq "true"; then node floodviz/thumbnail/thumbnail.js; fi
EXPOSE 80
ENTRYPOINT ["nginx"]
CMD ["-g", "daemon off;"]