docker-embedded-rust/Dockerfile

17 lines
463 B
Docker

FROM rust:1
RUN useradd -d /build -m -u 29380 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