-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
46 lines (28 loc) · 946 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
37
38
39
40
41
42
43
44
45
46
### BUILDER ###
FROM node:alpine AS builder
WORKDIR /usr/src/evm-decompiler-res
COPY . .
COPY package*.json ./
RUN npm install
RUN npx tsc
### HEIMDALL INSTALLER ###
FROM rust:latest AS heimdall-installer
RUN apt-get update \
&& apt-get install -y curl
# get bifrost - heimdall's installation manager
RUN curl -L http://get.heimdall.rs | bash
# run bifrost to install heimdall -- lock at 0.6.5
RUN ./root/.bifrost/bin/bifrost -v 0.6.5
### PRODUCTION ###
FROM ubuntu:latest AS production
RUN apt-get update \
&& apt-get install -y nodejs \
&& apt-get install -y git
ARG NODE_ENV=production
ENV NODE_ENV=${NODE_ENV}
WORKDIR /usr/src/evm-decompiler-res
COPY --from=builder /usr/src/evm-decompiler-res/dist ./server
COPY --from=heimdall-installer /root/.bifrost/bin/heimdall ./heimdall-rs/
COPY --from=builder /usr/src/evm-decompiler-res/node_modules ./server/node_modules
EXPOSE 7639
CMD ["node", "server/server.js"]