web3-proxy/Dockerfile

19 lines
575 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-05-13 10:05:38 +03:00
# potentially faster. https://nnethercote.github.io/perf-book/build-configuration.html
ENV RUSTFLAGS "-C target-cpu=native"
2022-04-23 21:00:03 +03:00
WORKDIR /usr/src/web3-proxy
COPY . .
RUN --mount=type=cache,target=/usr/local/cargo/registry \
--mount=type=cache,target=/usr/src/web3-proxy/target \
2022-05-06 09:33:29 +03:00
cargo install --locked --path ./web3-proxy
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-04-23 21:00:03 +03:00
COPY --from=builder /usr/local/cargo/bin/web3-proxy /usr/local/bin/web3-proxy
2022-05-06 04:25:49 +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"