web3-proxy/Dockerfile
2023-01-19 02:32:24 -08:00

22 lines
626 B
Docker

FROM rust:1-bullseye as builder
ENV PATH /root/.foundry/bin:$PATH
RUN curl -L https://foundry.paradigm.xyz | bash && foundryup
WORKDIR /usr/src/web3_proxy
COPY . .
RUN --mount=type=cache,target=/usr/local/cargo/registry \
--mount=type=cache,target=/usr/src/web3_proxy/target \
cargo test &&\
cargo install --locked --no-default-features --root /opt/bin --path ./web3_proxy
FROM debian:bullseye-slim
COPY --from=builder /opt/bin/* /usr/local/bin/
ENTRYPOINT ["web3_proxy_cli"]
CMD [ "--config", "/web3-proxy.toml", "proxyd" ]
# TODO: lower log level when done with prototyping
ENV RUST_LOG "web3_proxy=debug"