forked from benetech/mmlc-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
50 lines (37 loc) · 1.16 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
FROM ubuntu:14.04
MAINTAINER John Brugge <[email protected]>
EXPOSE 1337
RUN mkdir /usr/local/mmlc-api
WORKDIR /usr/local/mmlc-api
# Make sure we're up to date.
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update -y && apt-get upgrade -y && \
apt-get install -y curl unzip && \
apt-get install -y build-essential
RUN curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
# Install required packages.
RUN apt-get install -y \
nodejs \
openjdk-7-jre-headless \
python
COPY api api
COPY config config
COPY tasks tasks
COPY 6379.conf 6379.conf
COPY app.js app.js
COPY kue.js kue.js
COPY package.json package.json
# Install Node.js packages.
RUN npm -g -y install npm@latest-2
RUN npm -g -y install [email protected] cucumber && \
npm -y install --no-bin-links
# Install batik for mathjax-node
RUN curl -O http://www.apache.org/dist/xmlgraphics/batik/binaries/batik-1.7.zip
RUN unzip batik-1.7.zip && \
sudo cp -r batik-1.7/* node_modules/mathjax-node/batik/ && \
sudo rm -rf batik*
RUN groupadd -g 11500 -r mmlc-api && \
useradd -g mmlc-api -u 11500 -m -s /bin/bash mmlc-api
RUN chmod -R ugo+rw /usr/local/mmlc-api
USER mmlc-api
CMD ["node", "app.js"]