FROM rust:1 RUN useradd -D -h /build bob \ && cp -r /usr/local/cargo /build/.cargo \ && chown -R bob:bob /build/.cargo \ && cp -r /usr/local/rustup /build/.rustup \ && chown -R bob:bob /build/.rustup \ && sed -i 's@/usr/local/cargo@~/.cargo@' /build/.cargo/env \ && echo '. ~/.cargo/env' >> /build/.profile USER bob WORKDIR /build RUN rustup target add thumbv6m-none-eabi \ && rustup component add llvm-tools \ && cargo install cargo-binutils