January 2019
Intermediate to advanced
520 pages
14h 32m
English
The email microservice doesn't use the diesel crate and we can use the official Rust image to build a microservice. Also, the email microservice has templates that are used to prepare the contents of emails. We will use the same .dockerignore file, but will copy Dockerfile from the previous example and add some changes related to the email microservice:
FROM rust:1.30.1RUN USER=root cargo new --bin mails-microserviceWORKDIR /mails-microserviceCOPY ./Cargo.toml ./Cargo.tomlRUN cargo buildRUN rm src/*.rsCOPY ./src ./srcCOPY ./templates ./templatesRUN rm ./target/debug/deps/mails_microservice*RUN cargo buildCMD ["./target/debug/mails-microservice"]
We created this image from the rust:1.30.1 image. The stable version ...
Read now
Unlock full access