mirror of
https://github.com/eth-act/ere.git
synced 2026-02-19 11:54:42 -05:00
37 lines
1004 B
Docker
37 lines
1004 B
Docker
ARG BASE_ZKVM_IMAGE=ere-base-nexus:latest
|
|
ARG RUNTIME_IMAGE=ubuntu:24.04
|
|
|
|
FROM $BASE_ZKVM_IMAGE AS base_zkvm
|
|
|
|
FROM base_zkvm AS build_stage
|
|
|
|
COPY . /ere
|
|
|
|
WORKDIR /ere
|
|
|
|
RUN cargo build --release --package ere-compiler --bin ere-compiler --features nexus \
|
|
&& mkdir bin && mv target/release/ere-compiler bin/ere-compiler \
|
|
&& cargo clean && rm -rf $CARGO_HOME/registry/
|
|
|
|
FROM $RUNTIME_IMAGE AS runtime_stage
|
|
|
|
# Install common dependencies and build tools
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
build-essential \
|
|
ca-certificates \
|
|
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
|
|
|
# Copy Rust
|
|
COPY --from=base_zkvm /usr/local/cargo /usr/local/cargo
|
|
COPY --from=base_zkvm /usr/local/rustup /usr/local/rustup
|
|
|
|
# Add Rust to path
|
|
ENV RUSTUP_HOME=/usr/local/rustup \
|
|
CARGO_HOME=/usr/local/cargo \
|
|
PATH=/usr/local/cargo/bin:$PATH
|
|
|
|
# Copy ere-compiler
|
|
COPY --from=build_stage /ere/bin/ere-compiler /ere/bin/ere-compiler
|
|
|
|
ENTRYPOINT ["/ere/bin/ere-compiler"]
|