forked from sickpig/bch-rpc-explorer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
25 lines (24 loc) · 707 Bytes
/
Dockerfile
File metadata and controls
25 lines (24 loc) · 707 Bytes
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
FROM node:buster-slim as builder
WORKDIR /workspace
RUN apt-get update -q && \
apt-get install -qy build-essential git python
ADD package*.json /workspace
RUN npm install && \
apt-get remove -qy build-essential git python &&\
rm -rf /var/lib/apt/lists/* && \
apt autoremove -y && \
apt-get clean
FROM node:buster-slim
RUN apt-get update -q && \
apt-get install -qy libjemalloc2 && \
rm -rf /var/lib/apt/lists/* && \
apt autoremove -y && \
apt-get clean
WORKDIR /workspace
COPY --from=builder /workspace .
CMD node-gyp rebuild
ENV NODE_OPTIONS=--max_old_space_size=4096
ENV LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.2
ADD . /workspace
CMD npm start
EXPOSE 3002