ruduino/Dockerfile.ci

22 lines
634 B
Docker
Raw Permalink Normal View History

2020-07-24 08:12:52 +00:00
FROM ubuntu:18.04
RUN useradd -m avr-rust
# Install dependencies
RUN apt-get update -y && apt-get install -y wget gcc binutils gcc-avr avr-libc
RUN mkdir -p /code && chown avr-rust:avr-rust /code
USER avr-rust
# Install Rustup along with nightly
RUN wget -q https://sh.rustup.rs -O /tmp/rustup.sh && sh /tmp/rustup.sh -y --profile minimal --default-toolchain nightly -c rust-src --quiet
2020-07-24 08:12:52 +00:00
ENV PATH=/home/avr-rust/.cargo/bin:$PATH
COPY --chown=avr-rust:avr-rust . /code/ruduino
WORKDIR /code/ruduino
ENV AVR_CPU_FREQUENCY_HZ=16000000
2020-07-24 08:12:52 +00:00
CMD ["cargo", "build", "-Z", "build-std=core", "--target", "avr-atmega328p.json", "--release"]