-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(en): added Dockerfile to build EN from scratch (#2640)
Signed-off-by: tomg10 <[email protected]>
- Loading branch information
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
docs/guides/external-node/building-from-scratch/Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
FROM matterlabs/zk-environment:latest2.0-lightweight | ||
|
||
RUN git clone https://github.com/matter-labs/zksync-era | ||
|
||
WORKDIR /usr/src/zksync/zksync-era | ||
|
||
# core 24.16.0 (#2608), see: https://github.com/matter-labs/zksync-era/releases | ||
RUN git reset --hard 1ac52c5 | ||
|
||
ENV ZKSYNC_HOME=/usr/src/zksync/zksync-era | ||
ENV PATH="${ZKSYNC_HOME}/bin:${PATH}" | ||
|
||
# build zk tool | ||
RUN zk | ||
RUN yarn zk build | ||
|
||
# build rust | ||
RUN cargo build --release | ||
RUN cp target/release/zksync_external_node /usr/bin | ||
|
||
# build contracts | ||
RUN git submodule update --init --recursive | ||
RUN zk run yarn | ||
RUN zk compiler all | ||
RUN zk contract build | ||
RUN zk f yarn run l2-contracts build | ||
|
||
# copy migrations (node expects them to be in specific directory) | ||
RUN cp -r core/lib/dal/migrations/ migrations | ||
|
||
ENTRYPOINT [ "sh", "docker/external-node/entrypoint.sh"] |