From a0e9ebfd17f6a3baba13ec0a37eea4238364acb6 Mon Sep 17 00:00:00 2001 From: Jonathan <94441036+zeapoz@users.noreply.github.com> Date: Wed, 15 May 2024 15:56:00 +0200 Subject: [PATCH] docker: update dockerfile (#101) --- Dockerfile | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/Dockerfile b/Dockerfile index e0a5ed1..353032c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM rustlang/rust:nightly-bookworm-slim +FROM debian:bookworm-slim RUN set -eux; \ apt-get update; \ @@ -6,24 +6,27 @@ RUN set -eux; \ build-essential \ libclang-dev \ libssl-dev \ - pkg-config + pkg-config \ + openssl \ + protobuf-compiler \ + ca-certificates \ + curl -COPY ./src ./src +COPY src/ src/ COPY Cargo.toml Cargo.toml COPY Cargo.lock Cargo.lock +COPY rust-toolchain.toml rust-toolchain.toml -RUN cargo build --release +COPY state-reconstruct-fetcher/ state-reconstruct-fetcher/ +COPY state-reconstruct-storage/ state-reconstruct-storage/ -FROM debian:bookworm-slim +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain none +ENV PATH="/root/.cargo/bin:${PATH}" -RUN set -eux; \ - apt-get update; \ - apt-get install -y --no-install-recommends \ - ca-certificates \ - openssl +RUN cargo build --release +ENV PATH="/target/release:${PATH}" -COPY --from=0 ./target/release/state-reconstruct /state-reconstruct -COPY IZkSync.json IZkSync.json +COPY abi/ abi/ COPY InitialState.csv InitialState.csv -CMD ["/state-reconstruct", "reconstruct", "l1", "--http-url", "https://eth.llamarpc.com"] +CMD ["state-reconstruct", "reconstruct", "l1", "--http-url", "https://eth.llamarpc.com"]