alamb commented on issue #86:
URL: https://github.com/apache/arrow-rs/issues/86#issuecomment-826797741


   Comment from Jorge Leitão(jorgecarleitao) @ 2020-07-14T13:22:14.139+0000:
   <pre>One idea that I often use:
   
   
   {code}
   # use specific version here to freeze layer
   FROM rust:1.44.1-buster AS backend-builder
   
   # freeze the version for deterministic builds
   RUN rustup update nightly-2020-07-03 && rustup default nightly-2020-07-03
   
   # Compile a dummy program, so that the dependencies are compiled and cached 
on a layer
   # see https://stackoverflow.com/a/58474618/931303 for details
   RUN echo "fn main() {}" > dummy.rs
   ## if cargo.lock or cargo changes, we trigger a build of all dependencies.
   COPY backend/Cargo.lock backend/Cargo.toml /
   RUN sed -i 's@src/[email protected]@' Cargo.toml
   RUN cargo build --release
   RUN sed -i '[email protected]@src/main.rs@' Cargo.toml
   
   # compile the actual program
   COPY ...
   
   RUN cargo build --release
   {code}
   </pre>
   
   Comment from Jorge Leitão(jorgecarleitao) @ 2020-07-19T15:47:36.675+0000:
   <pre>I believe that this is a duplicate of ARROW-7136
   
    </pre>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to