forked from bitcoinvsalts/node-binance-trader
-
Notifications
You must be signed in to change notification settings - Fork 0
/
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.16.0-buster@sha256:5ce0dfc26443809b722786397662c1aa62dea79349fa0aae7aaa10a63b559248 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.16.0-buster@sha256:5ce0dfc26443809b722786397662c1aa62dea79349fa0aae7aaa10a63b559248 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.16.0-alpine3.13@sha256:7eb57d8fd2d3ee789dbb551bdf5b0325369c3ad7a72a690e80d034041da7e42d AS production
ENV NODE_ENV=production
WORKDIR /srv/app/
COPY --from=build /srv/app/ ./