-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
62 lines (43 loc) · 1.23 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# FROM python:3.9-slim AS prover
# WORKDIR /app
# RUN apt-get update && \
# apt-get install -y --no-install-recommends g++ libgmp3-dev && \
# pip install ecdsa==0.18.0 \
# bitarray==2.7.3 \
# fastecdsa==2.2.3 \
# sympy==1.11.1 \
# typeguard==2.13.3 \
# cairo-lang==0.11.0
# # this is node
# COPY node /app/node
# #this is python
# COPY lambdaworks_stark_platinum /app/stark_prover
# WORKDIR /app/node
# RUN npm install
# CMD [ "npm", "run", "dev" ]
# Stage 1: Node.js and npm setup
FROM node:18 AS node_stage
WORKDIR /app
COPY node/package.json /app/
COPY node/package-lock.json /app/
RUN npm install
# Stage 2: Python setup
FROM python:3.9-slim AS python_stage
WORKDIR /app
RUN apt-get update && \
apt-get install -y --no-install-recommends g++ libgmp3-dev
COPY lambdaworks_stark_platinum /app/stark_prover
RUN pip install ecdsa==0.18.0 \
bitarray==2.7.3 \
fastecdsa==2.2.3 \
sympy==1.11.1 \
typeguard==2.13.3 \
cairo-lang==0.11.0
# Stage 3: Final image with both Node.js and Python
FROM node_stage AS final_stage
COPY /node /app/node
COPY --from=node_stage /app/node_modules /app/node_modules
COPY --from=python_stage /app/stark_prover /app/stark_prover
WORKDIR /app/node
EXPOSE 3000
CMD [ "npm", "run", "dev" ]