Using `cargo install` in docker

We are going to use cargo install mdbook inside Docker. We then remove the temporary files created by install process to reduce the image size

RUN CARGO_TARGET_DIR=/tmp/cargo cargo install mdbook --root /usr && rm -rf /tmp/cargo
RUN mdbook --version

Leave a Reply