web3-proxy/Dockerfile

23 lines
764 B
Docker
Raw Normal View History

2022-05-12 22:58:26 +03:00
FROM rust:1-bullseye as builder
2022-04-23 21:00:03 +03:00
2022-12-15 06:25:57 +03:00
ENV PATH /root/.foundry/bin:$PATH
RUN curl -L https://foundry.paradigm.xyz | bash && foundryup
2022-08-06 08:46:33 +03:00
WORKDIR /usr/src/web3_proxy
2022-04-23 21:00:03 +03:00
COPY . .
RUN --mount=type=cache,target=/usr/local/cargo/registry \
2022-08-06 08:46:33 +03:00
--mount=type=cache,target=/usr/src/web3_proxy/target \
2022-12-15 06:02:49 +03:00
cargo test &&\
cargo doc &&\
cargo build --locked --release
2022-04-23 21:00:03 +03:00
2022-05-12 22:58:26 +03:00
FROM debian:bullseye-slim
2022-05-06 04:25:49 +03:00
2022-12-15 06:02:49 +03:00
COPY --from=builder /usr/src/web3_proxy/target/doc /usr/local/share/web3_proxy
COPY --from=builder /usr/src/web3_proxy/target/release/web3_proxy /usr/local/bin/web3_proxy
COPY --from=builder /usr/src/web3_proxy/target/release/web3_proxy_cli /usr/local/bin/web3_proxy_cli
2022-08-06 08:38:19 +03:00
ENTRYPOINT ["web3_proxy"]
2022-05-12 22:58:26 +03:00
# TODO: lower log level when done with prototyping
ENV RUST_LOG "web3_proxy=debug"