Skip to content

Commit

Permalink
feat(en): added Dockerfile to build EN from scratch (#2640)
Browse files Browse the repository at this point in the history
Signed-off-by: tomg10 <[email protected]>
  • Loading branch information
tomg10 authored Aug 12, 2024
1 parent 8d31ebc commit 0f45505
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions docs/guides/external-node/building-from-scratch/Dockerfile
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"]

0 comments on commit 0f45505

Please sign in to comment.