Skip to content

Instantly share code, notes, and snippets.

@shawnnapora
Created July 16, 2022 13:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shawnnapora/2b81849ff0dbb7ba3ed86e5b4c8920d2 to your computer and use it in GitHub Desktop.
Save shawnnapora/2b81849ff0dbb7ba3ed86e5b4c8920d2 to your computer and use it in GitHub Desktop.
Embedded rust dockerfile
FROM ubuntu:20.04
RUN ln -fs /usr/share/zoneinfo/America/UTC /etc/localtime
RUN \
apt update; \
DEBIAN_FRONTEND=noninteractive apt install -y curl gcc git libudev-dev pkg-config;
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y;
ENV PATH="/root/.cargo/bin:${PATH}"
RUN \
rustup target add thumbv6m-none-eabi; \
cargo install elf2uf2-rs --locked; \
cargo install flip-link
COPY . /rust
WORKDIR /rust
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment