January 2019
Intermediate to advanced
520 pages
14h 32m
English
The second microservice we will use is the content microservice that we created in Chapter 9, Simple REST Definition and Request Routing with Frameworks. We also prepared this service for use with the PostgreSQL database. We borrowed the dockerignore file from the previous example and adapted the Dockerfile file for this microservice. Look at the following code:
FROM rust:nightlyRUN USER=root cargo new --bin content-microserviceWORKDIR /content-microserviceCOPY ./Cargo.toml ./Cargo.tomlRUN cargo buildRUN rm src/*.rsCOPY ./src ./srcRUN rm ./target/debug/deps/content_microservice*RUN cargo buildCMD ["./target/debug/content-microservice"]EXPOSE 8000
As you can see, this Dockerfile is the same as the Dockerfile of the ...
Read now
Unlock full access