Dockerfile 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. FROM ubuntu:18.04
  2. ENV PATH /root/.cargo/bin:$PATH
  3. RUN apt update && \
  4. DEBIAN_FRONTEND=noninteractive apt install -y --no-install-recommends \
  5. software-properties-common \
  6. gpg-agent \
  7. make \
  8. gcc-arm-none-eabi \
  9. binutils-arm-none-eabi \
  10. libnewlib-arm-none-eabi \
  11. autoconf \
  12. automake \
  13. libtool \
  14. curl \
  15. wget \
  16. g++ \
  17. unzip \
  18. build-essential \
  19. python \
  20. python-pip \
  21. python3 \
  22. imagemagick \
  23. srecord \
  24. libstdc++-arm-none-eabi-newlib \
  25. git \
  26. && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
  27. RUN wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key| apt-key add - && add-apt-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-12 main"
  28. RUN apt update && \
  29. apt install -y --no-install-recommends \
  30. libclang-12-dev \
  31. clang-format-12 \
  32. && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
  33. RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --profile=minimal --target thumbv7em-none-eabi thumbv7em-none-eabihf && \
  34. rustup component add rustfmt --toolchain stable-x86_64-unknown-linux-gnu
  35. # st-flash
  36. RUN apt update && \
  37. apt install -y --no-install-recommends \
  38. gcc build-essential cmake libusb-1.0 libusb-1.0-0-dev libgtk-3-dev pandoc \
  39. && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
  40. wget https://github.com/stlink-org/stlink/archive/v1.5.1.zip && \
  41. unzip v1.5.1.zip && \
  42. cd stlink-1.5.1 && make clean && make release && \
  43. cd build/Release && make install && ldconfig
  44. # gdb
  45. RUN apt update && \
  46. apt install -y --no-install-recommends \
  47. python-dev && \
  48. apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
  49. wget http://mirrors.kernel.org/ubuntu/pool/main/r/readline6/libreadline6_6.3-8ubuntu2_amd64.deb && \
  50. dpkg -i libreadline6_6.3-8ubuntu2_amd64.deb && \
  51. wget http://mirrors.kernel.org/ubuntu/pool/universe/g/gdb-arm-none-eabi/gdb-arm-none-eabi_7.10-1ubuntu3+9_amd64.deb && \
  52. dpkg -i gdb-arm-none-eabi_7.10-1ubuntu3+9_amd64.deb
  53. # dfu-util
  54. RUN apt update && \
  55. apt install -y --no-install-recommends \
  56. dfu-util \
  57. && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
  58. # install hex2dfu
  59. RUN wget https://github.com/rusdacent/hex2dfu/archive/master.zip --output-document=hex2dfu.zip && \
  60. unzip hex2dfu.zip && \
  61. cd hex2dfu-master && gcc hex2dfu.c ED25519/*.c -o hex2dfu && \
  62. ln -s ${PWD}/hex2dfu /usr/bin/hex2dfu
  63. COPY entrypoint.sh syntax_check.sh /
  64. RUN chmod +x /syntax_check.sh
  65. ENTRYPOINT ["/entrypoint.sh"]