Dockerfile 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. FROM ubuntu:hirsute
  2. RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \
  3. ca-certificates \
  4. build-essential \
  5. python3 \
  6. git \
  7. clang-format-12 \
  8. dfu-util \
  9. openocd \
  10. srecord \
  11. libncurses5 \
  12. python-setuptools \
  13. libpython2.7-dev \
  14. libxml2-dev \
  15. libxslt1-dev \
  16. zlib1g-dev \
  17. wget && \
  18. apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
  19. RUN wget --progress=dot:giga "https://developer.arm.com/-/media/Files/downloads/gnu-rm/10.3-2021.07/gcc-arm-none-eabi-10.3-2021.07-$(uname -m)-linux.tar.bz2" && \
  20. tar xjf gcc-arm-none-eabi-10.3-2021.07-$(uname -m)-linux.tar.bz2 && \
  21. rm gcc-arm-none-eabi-10.3-2021.07-$(uname -m)-linux.tar.bz2 && \
  22. cd gcc-arm-none-eabi-10.3-2021.07/bin/ && \
  23. rm -rf ../share && \
  24. for file in * ; do ln -s "${PWD}/${file}" "/usr/bin/${file}" ; done && \
  25. cd / && arm-none-eabi-gcc -v && arm-none-eabi-gdb -v
  26. RUN wget --progress=dot:giga -O - https://bootstrap.pypa.io/pip/2.7/get-pip.py | python2 && \
  27. pip install --no-cache-dir lxml==4.6.3
  28. RUN git clone https://github.com/rusdacent/hex2dfu.git && \
  29. cd hex2dfu && gcc hex2dfu.c ED25519/*.c -o hex2dfu && mv ./hex2dfu /usr/local/bin/hex2dfu && \
  30. hex2dfu -h
  31. RUN git clone --depth 1 --branch v0.4.1 https://github.com/atomicobject/heatshrink.git && \
  32. cd heatshrink && make && mv ./heatshrink /usr/local/bin/heatshrink
  33. COPY entrypoint.sh syntax_check.sh /
  34. RUN chmod +x /syntax_check.sh
  35. ENTRYPOINT ["/entrypoint.sh"]