-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (22 loc) · 864 Bytes
/
Dockerfile
File metadata and controls
29 lines (22 loc) · 864 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
26
27
28
29
FROM node:12@sha256:01627afeb110b3054ba4a1405541ca095c8bfca1cb6f2be9479c767a2711879e as node
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update -y && \
apt-get install -y build-essential apt-utils git curl software-properties-common && \
rm -rf /var/lib/apt/lists/* && \
apt-get autoremove -y && \
apt-get clean
RUN npm install pm2 -g
FROM node as explorer-env
ADD . /rsk-explorer-api
WORKDIR /rsk-explorer-api
RUN git checkout -B docker-branch origin/master
RUN mkdir /var/log/rsk-explorer/ &&\
touch /var/log/rsk-explorer/blocks.json &&\
touch /var/log/rsk-explorer/api.json
RUN npm install
RUN npm run build
COPY dockerized/explorer-api/config.json /rsk-explorer-api/config.json
FROM explorer-env as services
CMD ["pm2-runtime", "dist/services/blocks.config.js"]
FROM explorer-env as api
CMD ["pm2-runtime","dist/api/index.js"]