-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathDockerfile
41 lines (29 loc) · 1.1 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
FROM node:6
RUN apt-get update && apt-get install -y libelf-dev python-all libicu-dev
RUN node --version
RUN npm --version
RUN npm install -g babel-cli
RUN npm install -g babel-watch
RUN npm install -g babel-core
RUN npm install -g babel-loader
RUN npm install -g babel-register
WORKDIR /stage
RUN npm install babel-plugin-syntax-async-functions
RUN npm install babel-plugin-transform-builtin-extend
RUN npm install babel-plugin-transform-flow-strip-types
RUN npm install babel-plugin-transform-object-rest-spread
RUN npm install babel-plugin-transform-regenerator
RUN npm install babel-preset-es2015
COPY ./config/.babelrc /stage/.babelrc
COPY ./serverPackage.json /stage/package.json
RUN npm install
RUN mkdir /stage/static
RUN mkdir /stage/built
# Build the server and put it in /stage/built
COPY ./serverSrc /stage/serverSrc
RUN babel --out-dir /stage/built /stage/serverSrc
# Build the client lib and put it in /stage/static
COPY ./clientSrc /stage/clientSrc
RUN babel --out-file /stage/static/aggregatorClient.js /stage/clientSrc/aggregatorClient.js
WORKDIR /stage/built
CMD ["node", "server.js"]