January 2019
Intermediate to advanced
520 pages
14h 32m
English
Since Docker copies all files from the building folder, we have to add the .dockerignore file that contains the patterns of paths to avoid copying these files. It's useful, for example, to skip the target building folder, because it may contain gigabytes of data for large projects, but in any case, we don't need all of them since we'll build a microservice using the image with the Rust compiler. Add the .dockerignore file:
target Cargo.lock **/*.rs.bk files *.db
We will ignore all Rust's build artifacts (such as the target, Cargo.lock, and *.bk files that are produced by the rustfmt tool that we will use later) in the next chapter, where we will explore continuous integration tools. We also included two patterns: files—this ...
Read now
Unlock full access