-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
43 lines (32 loc) · 1.07 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
##########################################################################
#
# Builder image:
# Runs module install and compiles TypeScript.
#
##########################################################################
FROM node:10 as builder
RUN mkdir -p /ethql
WORKDIR /ethql
# Uncomment if patch-package is needed again.
# ADD patches /ethql/patches
# Install dependencies. This step is performed separately to leverage Docker layer caching.
COPY package.json yarn.lock /ethql/
RUN yarn install --production && \
cp -R node_modules node_modules_production && \
yarn install
COPY . /ethql
RUN yarn build:ts
##########################################################################
#
# Production image:
# Contains only production dependencies and compiled JS.
#
##########################################################################
FROM node:10-alpine
RUN mkdir -p /ethql
WORKDIR /ethql
COPY --from=builder /ethql/node_modules_production /ethql/node_modules
COPY --from=builder /ethql/dist /ethql/dist
ENTRYPOINT [ "node", "/ethql/dist/index.js" ]
EXPOSE 4000
STOPSIGNAL 9