Skip to content

Commit

Permalink
docker: update dockerfile (#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
zeapoz authored May 15, 2024
1 parent 2453674 commit a0e9ebf
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,29 +1,32 @@
FROM rustlang/rust:nightly-bookworm-slim
FROM debian:bookworm-slim

RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends \
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"]

0 comments on commit a0e9ebf

Please sign in to comment.