forked from bitcoinvsalts/node-binance-trader
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
36 lines (21 loc) · 843 Bytes
/
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
#############
# Should be the specific version of node:alpine3.
FROM node:14.15.5-buster@sha256:28b64286eb60f8b14112c9d3900a826743796b0efe04344c8a25371d56ac6b86 AS development
WORKDIR /srv/app/
COPY ./package.json ./package-lock.json ./
RUN npm install
COPY ./ ./
########################
# Should be the specific version of node:alpine3.
FROM node:14.15.5-buster@sha256:28b64286eb60f8b14112c9d3900a826743796b0efe04344c8a25371d56ac6b86 AS build
ENV NODE_ENV=production
WORKDIR /srv/app/
COPY --from=development /srv/app/ ./
# Discard devDependencies.
RUN npm install
#######################
# Should be the specific version of node:alpine3.
FROM node:14.15.5-alpine3.13@sha256:17dc61b31b2a12a1390b5a4e2e69b0d0886a0d77647f88c5a33787ac457fa83e AS production
ENV NODE_ENV=production
WORKDIR /srv/app/
COPY --from=build /srv/app/ ./