-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
66 lines (39 loc) · 1.33 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
63
64
65
# syntax=docker/dockerfile:1
# Comments are provided throughout this file to help you get started.
# If you need more help, visit the Dockerfile reference guide at
# https://docs.docker.com/engine/reference/builder/
ARG NODE_VERSION=21.3.0
ARG PNPM_VERSION=8.12.0
FROM node as contracts
RUN apt-get update
RUN npm install -g pnpm@${PNPM_VERSION}
RUN apt-get install -y build-essential cmake libgmp-dev libsodium-dev nasm curl m4
WORKDIR /usr/src/app
COPY . .
RUN curl -L https://foundry.paradigm.xyz | bash
RUN sh docker_scripts/contracts_setup.sh
EXPOSE 8545
RUN ["chmod", "+x", "/usr/src/app/docker_scripts/contracts_run.sh"]
CMD ["/usr/src/app/docker_scripts/contracts_run.sh"]
FROM node as enclave
RUN npm install -g pnpm@${PNPM_VERSION}
WORKDIR /usr/src/app
COPY --from=contracts /usr/src/app /usr/src/app
RUN sh docker_scripts/enclave_setup.sh
EXPOSE 3000
CMD ["pnpm", "-C", "enclave", "dev"]
FROM node as DA
RUN npm install -g pnpm@${PNPM_VERSION}
WORKDIR /usr/src/app
COPY --from=contracts /usr/src/app /usr/src/app
RUN sh docker_scripts/da_setup.sh
# Run the application.
CMD ["pnpm", "-C", "DA", "dev"]
FROM node as client
RUN npm install -g pnpm@${PNPM_VERSION}
WORKDIR /usr/src/app
# COPY . .
COPY --from=contracts /usr/src/app /usr/src/app
RUN sh docker_scripts/client_setup.sh
# Run the application.
CMD ["sleep", "3600"]