you'd actually get smaller and cleaner layer as the rs files in src would not be part of it. By separating to two different layers you actually create one layer with deps+rs files and another layer that removes the rs files IMHO.
You have to use "&&" instead of "&", if you use a single & then the rm command would run before cargo builds, additionally you can remove this line too
RUN rm ./target/release/deps/holodeck*
and change that previous line too
RUN cargo build --release&&rm src/*.rs &&rm ./target/release/deps/holodeck*
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
When running
if you ran
you'd actually get smaller and cleaner layer as the rs files in src would not be part of it. By separating to two different layers you actually create one layer with deps+rs files and another layer that removes the rs files IMHO.
You have to use "&&" instead of "&", if you use a single & then the rm command would run before cargo builds, additionally you can remove this line too
and change that previous line too