Skip to content

New witness calculation and DA config #431

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
/scripts/benchmark-results.*
/test/
/integration_logs
Dockerfile

# editors
.code
Expand Down
32 changes: 21 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,20 @@
#
# Based on https://depot.dev/blog/rust-dockerfile-best-practices
#
ARG FEATURES
ARG RBUILDER_BIN="rbuilder"

FROM rust:1.82 as base

ARG FEATURES
RUN apt-get update \
&& apt-get install -y clang libclang-dev

RUN rustup component add clippy rustfmt


RUN cargo install sccache --version ^0.8
RUN cargo install cargo-chef --version ^0.1

RUN apt-get update \
&& apt-get install -y clang libclang-dev

ENV CARGO_HOME=/usr/local/cargo
ENV RUSTC_WRAPPER=sccache
Expand All @@ -37,34 +42,39 @@ RUN --mount=type=cache,target=/usr/local/cargo/registry \
FROM base as builder
WORKDIR /app
COPY --from=planner /app/recipe.json recipe.json
RUN --mount=type=cache,target=$SCCACHE_DIR,sharing=locked \
RUN --mount=type=cache,target=/usr/local/cargo/registry \
--mount=type=cache,target=/usr/local/cargo/git \
--mount=type=cache,target=$SCCACHE_DIR,sharing=locked \
cargo chef cook --release --recipe-path recipe.json
COPY . .


FROM builder as rbuilder
ARG RBUILDER_BIN="rbuilder"
ARG RBUILDER_BIN
ARG FEATURES
RUN --mount=type=cache,target=/usr/local/cargo/registry \
--mount=type=cache,target=/usr/local/cargo/git \
--mount=type=cache,target=$SCCACHE_DIR,sharing=locked \
cargo build --release --features="$FEATURES" --package=${RBUILDER_BIN}

FROM builder as test-relay
ARG FEATURES
RUN --mount=type=cache,target=/usr/local/cargo/registry \
--mount=type=cache,target=/usr/local/cargo/git \
--mount=type=cache,target=$SCCACHE_DIR,sharing=locked \
cargo build --release --features="$FEATURES" --package=test-relay


# Runtime container for test-relay
FROM gcr.io/distroless/cc-debian12 as test-relay-runtime
WORKDIR /app
COPY --from=test-relay /app/target/release/test-relay /app/test-relay
ENTRYPOINT ["/app/test-relay"]

# Runtime container for rbuilder
FROM gcr.io/distroless/cc-debian12 as rbuilder-runtime
ARG RBUILDER_BIN
WORKDIR /app
COPY --from=rbuilder /app/target/release/rbuilder /app/rbuilder
COPY --from=rbuilder /app/target/release/${RBUILDER_BIN} /app/rbuilder
ENTRYPOINT ["/app/rbuilder"]

# Runtime container for test-relay
FROM gcr.io/distroless/cc-debian12 as test-relay-runtime
WORKDIR /app
COPY --from=test-relay /app/target/release/test-relay /app/test-relay
ENTRYPOINT ["/app/test-relay"]
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ clean: ## Clean up
build: ## Build (debug version)
cargo build --features "$(FEATURES)"

.PHONY: docker-image-rubilder
.PHONY: docker-image-rbuilder
docker-image-rubilder: ## Build a rbuilder Docker image
docker build --platform linux/amd64 --target rbuilder-runtime --build-arg FEATURES="$(FEATURES)" . -t rbuilder

Expand Down
Loading