forked from dashevo/dapi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
44 lines (32 loc) · 1.02 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
44
FROM node:12-alpine
RUN apk update && \
apk --no-cache upgrade && \
apk add --no-cache git \
openssh-client \
python \
alpine-sdk \
zeromq-dev
# Install dependencies first, in a different location
# for easier app bind mounting for local development
WORKDIR /
COPY package.json package-lock.json ./
ENV npm_config_zmq_external=true
RUN npm ci --production
FROM node:12-alpine
# While we're using this image for tests
# We have to run `npm i` and zeromq build fails
RUN apk add zeromq-dev
RUN echo npm_config_zmq_external=true >> /etc/environment
LABEL maintainer="Dash Developers <[email protected]>"
LABEL description="DAPI Node.JS"
RUN apk update && apk add --no-cache zeromq-dev
# Copy NPM modules
COPY package.json package-lock.json ./
COPY --from=0 /node_modules/ /node_modules
ENV PATH /node_modules/.bin:$PATH
# Copy project files
WORKDIR /usr/src/app
COPY . ./
ARG NODE_ENV=production
ENV NODE_ENV ${NODE_ENV}
EXPOSE 2500 2501 2510