From 456e90373463f334fcbbf9eb61b1df1ea9955a50 Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Wed, 14 Dec 2022 19:02:49 -0800 Subject: [PATCH] docker build now includes test and doc --- Dockerfile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 579e06ca..702f4ee7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,12 +4,15 @@ 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 install --locked --path ./web3_proxy + cargo test &&\ + cargo doc &&\ + cargo build --locked --release FROM debian:bullseye-slim -COPY --from=builder /usr/local/cargo/bin/web3_proxy /usr/local/bin/web3_proxy -COPY --from=builder /usr/local/cargo/bin/web3_proxy_cli /usr/local/bin/web3_proxy_cli +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 ENTRYPOINT ["web3_proxy"] # TODO: lower log level when done with prototyping