January 2019
Intermediate to advanced
520 pages
14h 32m
English
We have prepared the Dockerfile to build an image that first builds all the dependencies for our microservice and then builds all the source code. To start this process, you have to use the Docker build command:
docker build -t users-microservice:latest
When you run this command, you will see how Docker prepares files to build an image and builds all the dependencies, but only for the empty crate without the sources of a microservice:
Sending build context to Docker daemon 13.82kBStep 1/12 : FROM rust:nightly ---> 91e52fb2cea5Step 2/12 : RUN USER=root cargo new --bin users-microservice ---> Running in 3ff6b18a9c72 Created binary (application) `users-microservice` packageRemoving intermediate container 3ff6b18a9c72 ---> ...
Read now
Unlock full access