forked from rsksmart/rif-relay-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
20 lines (20 loc) · 629 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# Compiler container
FROM node:12-alpine AS compiler
RUN apk add --no-cache build-base git bash
WORKDIR /usr/src/app
COPY package.json ./
RUN npm i --cache /tmp/1
COPY . ./
# Runtime container
FROM node:12-alpine
RUN apk add --no-cache bash
RUN mkdir -p /srv/app && chown node:node /srv/app \
&& mkdir -p /srv/data && chown node:node /srv/data
USER node
WORKDIR /srv/app
COPY --from=compiler --chown=node:node /usr/src/app/node_modules ./node_modules/
COPY --chown=node:node package*.json ./
COPY --chown=node:node server-config*.json ./
COPY --chown=node:node dist ./dist/
COPY --chown=node:node scripts ./scripts/
EXPOSE 8090