# WARNING: because whether or not to build a new deps image is based on # the SHA of `Cargo.lock`, changes to this Dockerfile will NOT # cause a new deps image to be built. If you change anything in # this file, it is necessary to also change `Cargo.lock`, such # as by appending a newline, to cause the deps image to be # rebuilt. # # See https://github.com/runconduit/conduit/issues/115 for more # information. FROM rust:1.23.0 WORKDIR /usr/src/conduit COPY codegen ./codegen COPY futures-mpsc-lossy ./futures-mpsc-lossy COPY tower-h2 ./tower-h2 COPY tower-router ./tower-router COPY tower-grpc-examples ./tower-grpc-examples COPY tower-grpc-build ./tower-grpc-build COPY tower-grpc ./tower-grpc COPY Cargo.toml Cargo.lock ./ COPY proto ./proto COPY proxy ./proxy # Cache as much as possible; but don't keep aroud the artifact or things might get # confusing. RUN cargo build -p conduit-proxy && rm target/debug/conduit-proxy RUN cargo build -p conduit-proxy --release && rm target/release/conduit-proxy