January 2019
Intermediate to advanced
520 pages
14h 32m
English
There are many ready-to-use images on Docker Hub. You can also find an official image here: https://hub.docker.com/_/rust/. But we will create our own image since official images contain a stable compiler version only. If it's enough for you, it's better to use official images, but if you use crates such as diesel, which need the nightly version of the Rust compiler, you will have to build your own image to build microservices.
Create a new Dockerfile and add the following content to it:
FROM buildpack-deps:stretchENV RUSTUP_HOME=/usr/local/rustup \ CARGO_HOME=/usr/local/cargo \ PATH=/usr/local/cargo/bin:$PATHRUN set -eux; \ url="https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-gnu/rustup-init"; ...
Read now
Unlock full access