Dockerfile 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. FROM ubuntu:18.04
  2. ENV PATH /root/.cargo/bin:$PATH
  3. RUN apt update && \
  4. apt install -y --no-install-recommends \
  5. make \
  6. gcc-arm-none-eabi \
  7. binutils-arm-none-eabi \
  8. libnewlib-arm-none-eabi \
  9. autoconf \
  10. automake \
  11. libtool \
  12. curl \
  13. wget \
  14. g++ \
  15. unzip \
  16. build-essential \
  17. python \
  18. python-pip \
  19. libstdc++-arm-none-eabi-newlib \
  20. libclang-10-dev \
  21. clang-format-10 \
  22. git \
  23. && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
  24. RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --profile=minimal --target thumbv7em-none-eabi thumbv7em-none-eabihf && \
  25. rustup component add rustfmt --toolchain stable-x86_64-unknown-linux-gnu
  26. # st-flash
  27. RUN apt update && \
  28. apt install -y --no-install-recommends \
  29. gcc build-essential cmake libusb-1.0 libusb-1.0-0-dev libgtk-3-dev pandoc \
  30. && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
  31. wget https://github.com/stlink-org/stlink/archive/v1.5.1.zip && \
  32. unzip v1.5.1.zip && \
  33. cd stlink-1.5.1 && make clean && make release && \
  34. cd build/Release && make install && ldconfig
  35. # gdb
  36. RUN apt update && \
  37. apt install -y --no-install-recommends \
  38. python-dev && \
  39. apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
  40. wget http://mirrors.kernel.org/ubuntu/pool/main/r/readline6/libreadline6_6.3-8ubuntu2_amd64.deb && \
  41. dpkg -i libreadline6_6.3-8ubuntu2_amd64.deb && \
  42. wget http://mirrors.kernel.org/ubuntu/pool/universe/g/gdb-arm-none-eabi/gdb-arm-none-eabi_7.10-1ubuntu3+9_amd64.deb && \
  43. dpkg -i gdb-arm-none-eabi_7.10-1ubuntu3+9_amd64.deb
  44. COPY entrypoint.sh syntax_check.sh /
  45. RUN chmod +x /syntax_check.sh
  46. ENTRYPOINT ["/entrypoint.sh"]