docker-embedded-rust/Dockerfile

17 lines
454 B
Docker
Raw Normal View History

2024-07-21 21:51:41 +02:00
FROM rust:1
2024-07-21 22:01:14 +02:00
RUN useradd -d /build -m bob \
2024-07-21 21:51:41 +02:00
&& 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