The image for the agent service created from the official image of minimal agent for TeamCity is as follows:
FROM jetbrains/teamcity-minimal-agent:latest
RUN apt-get update
RUN apt-get install -y build-essential
ENV RUST_VERSION=1.32.0
RUN curl https://sh.rustup.rs -sSf
| sh -s -- -y --no-modify-path --default-toolchain $RUST_VERSION
ENV PATH=/root/.cargo/bin:$PATH
RUN rustup --version;
cargo --version;
rustc --version;
RUN rustup component add rustfmt
RUN rustup component add clippy
As you can see, we installed the Rust compiler and added rustfmt and clippy as components with rustup.