Dockerfile 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. FROM ubuntu:18.04
  2. RUN apt update && \
  3. DEBIAN_FRONTEND=noninteractive apt install -y --no-install-recommends \
  4. software-properties-common \
  5. gpg-agent \
  6. make \
  7. cmake \
  8. autoconf \
  9. automake \
  10. libtool \
  11. libusb-1.0 \
  12. libusb-1.0-0-dev \
  13. libgtk-3-dev pandoc \
  14. curl \
  15. wget \
  16. g++ \
  17. gcc \
  18. unzip \
  19. build-essential \
  20. python \
  21. python-pip \
  22. python3 \
  23. imagemagick \
  24. srecord \
  25. git \
  26. pkg-config \
  27. dfu-util \
  28. && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
  29. 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"
  30. RUN apt update && \
  31. apt install -y --no-install-recommends \
  32. libclang-12-dev \
  33. clang-format-12 \
  34. && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
  35. # install arm-none-eabi
  36. RUN wget https://developer.arm.com/-/media/Files/downloads/gnu-rm/10-2020q4/gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2 && \
  37. tar xjf gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2 && \
  38. cd gcc-arm-none-eabi-10-2020-q4-major/bin/ && \
  39. for file in * ; do ln -s ${PWD}/${file} /usr/bin/${file} ; done && \
  40. cd / && arm-none-eabi-gcc -v && arm-none-eabi-gdb -v
  41. # install hex2dfu
  42. RUN wget https://github.com/rusdacent/hex2dfu/archive/master.zip --output-document=hex2dfu.zip && \
  43. unzip hex2dfu.zip && \
  44. cd hex2dfu-master && gcc hex2dfu.c ED25519/*.c -o hex2dfu && \
  45. ln -s ${PWD}/hex2dfu /usr/bin/hex2dfu
  46. # install openocd
  47. RUN git clone --depth 1 --branch v0.11.0 https://github.com/ntfreak/openocd.git && \
  48. cd openocd && ./bootstrap && ./configure && make install && \
  49. openocd --version
  50. COPY entrypoint.sh syntax_check.sh /
  51. RUN chmod +x /syntax_check.sh
  52. ENTRYPOINT ["/entrypoint.sh"]