@@ -4,125 +4,32 @@ ENV PATH="$PNPM_HOME:$PATH"
4
4
RUN corepack enable
5
5
RUN apt update
6
6
RUN apt install -y git bzip2
7
-
7
+ run apt-get install -y linux-perf
8
8
WORKDIR /app
9
9
10
10
ADD pnpm-lock.yaml pnpm-lock.yaml
11
11
ADD package.json package.json
12
- # ADD package-lock.json package-lock.json
13
- ADD tsconfig.examples.json tsconfig.examples.json
12
+ ADD package-lock.json package-lock.json
13
+ # ADD tsconfig.examples.json tsconfig.examples.json
14
14
ADD tsconfig.json tsconfig.json
15
- ADD tsconfig.mina-signer.json tsconfig.mina-signer.json
16
- ADD tsconfig.mina-signer-web.json tsconfig.mina-signer-web.json
17
- ADD tsconfig.node.json tsconfig.node.json
15
+ # ADD tsconfig.mina-signer.json tsconfig.mina-signer.json
16
+ # ADD tsconfig.mina-signer-web.json tsconfig.mina-signer-web.json
17
+ # ADD tsconfig.node.json tsconfig.node.json
18
18
ADD tsconfig.test.json tsconfig.test.json
19
- ADD tsconfig.web.json tsconfig.web.json
19
+ # ADD tsconfig.web.json tsconfig.web.json
20
20
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod --frozen-lockfile
21
21
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
22
22
23
- ## now the source is copied
24
- #COPY src /app/src
25
- #COPY tests /app/tests
26
- #COPY benchmark /app/benchmark
27
- #COPY jest /app/jest
28
- #COPY dune-project /app/dune-project
29
-
30
23
#RUN pnpm ci
31
24
RUN corepack enable
32
25
RUN corepack prepare pnpm@latest-9 --activate
33
26
RUN pnpm install
34
- # "dev": "npx tsc -p tsconfig.test.json && node src/build/copy-to-dist.js",
35
- RUN find
36
- RUN npx tsc -p tsconfig.test.json
37
-
38
- #RUN pnpm install "https://github.com/meta-introspector/jest.git"
39
- #RUN pnpm install "https://github.com/meta-introspector/ts-jest.git"
40
- #RUN pnpm install "https://github.com/meta-introspector/node-clinic-doctor"
41
- #RUN pnpm install "https://github.com/meta-introspector/node-clinic"
42
27
RUN pnpm install -g clinic
43
-
44
- RUN pnpm run build
45
-
46
- #RUN apt update
47
- #RUN apt install -y strace
48
- run apt-get install -y linux-perf # move to top
49
-
50
- # why is this needed?
51
- RUN ln -s /app/dist /app/src/mina-signer/dist
52
-
53
- # '/app/dist/node/bindings/compiled/_node_bindings/plonk_wasm.cjs' imported from /app/dist/node/bindings/js/node/node-backend.js
54
- # found here
55
- #./src/bindings/compiled/node_bindings/plonk_wasm.cjs
56
- #./src/bindings/compiled/_node_bindings/plonk_wasm.cjs
57
- #./dist/node/bindings/compiled/_node_bindings/plonk_wasm.cjs
58
-
59
- #run apt-get update
60
-
61
-
62
- #CMD [ "pnpm", "run", "test" ]
63
- #RUN pnpm run test || echo skip errors
64
-
65
- #COPY . /app
66
- WORKDIR /app
67
-
68
28
FROM base AS prod-deps
69
29
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod --frozen-lockfile
70
-
71
30
FROM base AS build
72
31
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
73
- RUN pnpm run build
74
-
75
- FROM base
76
- #COPY --from=prod-deps /app/node_modules /app/node_modules
77
- #COPY --from=build /app/dist /app/dist
78
-
79
- #COPY run-jest-tests.sh /app/run-jest-tests.sh
80
- #COPY jest.config.js /app/jest.config.js
81
- #COPY run-integration-tests.sh /app/run-integration-tests.sh
82
- #COPY run-unit-tests.sh /app/run-unit-tests.sh
83
- #COPY run-all-tests.sh /app/run-all-tests.sh
84
- #COPY run /app/run
85
- #COPY run-debug /app/run-debug
86
- #COPY run-minimal-mina-tests.sh /app/run-minimal-mina-tests.sh
87
- #COPY run-ci-benchmarks.sh /app/run-ci-benchmarks.sh
88
-
89
-
32
+ COPY --from=prod-deps /app/node_modules /app/node_modules
90
33
EXPOSE 8000
91
34
CMD [ "pnpm", "start" ]
92
35
93
-
94
-
95
- # # Use an official Ubuntu image as a base
96
- # #FROM ubuntu:latest
97
- # FROM o1labs/mina-local-network:compatible-latest-devnet
98
-
99
- # # Set the working directory to /app
100
- # WORKDIR /app
101
-
102
- # # Install required dependencies
103
- # RUN apt update && apt install -y \
104
- # git \
105
- # curl \
106
- # npm \
107
- # nodejs
108
-
109
- # # Install Node.js version 18
110
- # RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
111
- # RUN apt-get install -y nodejs
112
-
113
- # # Clone the repository and checkout the specific branch
114
- # RUN git clone https://github.com/meta-introspector/o1js.git .
115
- # RUN git checkout 7647eb9
116
-
117
- # # Install npm dependencies
118
- # RUN npm ci
119
-
120
- # # Build o1js
121
- # RUN npm run build
122
-
123
- # # Expose the port for the web server
124
- # EXPOSE 8080
125
-
126
- # # Run the command to start the web server when the container launches
127
- # CMD ["npm", "run", "start"]
128
-
0 commit comments