forked from AztecProtocol/aztec-packages
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
40 lines (30 loc) · 1.72 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
# This base dockerfile adds all the remaining source files, performs artifact generation, and builds the project.
# See yarn-project-base/Dockerfile for deeper insight into why things are how they are.
FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/noir-contracts-build as noir
FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/yarn-project-base as builder
# Copy in the entire workspace.
COPY . .
# Generate Noir contract TypeScript artifacts.
COPY --from=noir /usr/src/yarn-project/noir-contracts/target /usr/src/yarn-project/noir-contracts/target
# Run yarn build to have the json artifacts available for the types generator, generate types, build again.
RUN apk add perl
RUN cd /usr/src/yarn-project/noir-contracts && yarn build && ./scripts/types_all.sh && yarn build
# Cleanup to reduce final image size.
RUN rm -rf noir-contracts/target
# Build the entire project.
RUN yarn tsc -b
# Build aztec.js web artifact
RUN cd /usr/src/yarn-project/aztec.js && yarn build:web
FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/yarn-project-base
COPY --from=builder /usr/src/yarn-project /usr/src/yarn-project
# Download minimal CRS requirements
COPY --from=builder /usr/src/barretenberg/cpp/srs_db/download_ignition.sh /usr/src/yarn-project/circuits.js/resources/download_ignition.sh
WORKDIR /usr/src/yarn-project/circuits.js/resources
RUN ./download_ignition.sh 0 28 3200027
RUN ./download_ignition.sh 0 322560092 322560219 true
# Ensure wasm symlink is removed
RUN rm /usr/src/yarn-project/circuits.js/resources/aztec3-circuits.wasm
# Copy real wasm into yarn-project
RUN cp /usr/src/circuits/cpp/build-wasm/bin/aztec3-circuits.wasm /usr/src/yarn-project/circuits.js/resources/aztec3-circuits.wasm
WORKDIR /usr/src/yarn-project
ENTRYPOINT ["yarn"]