Dockerfile 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. jq \
  18. wget && \
  19. apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
  20. 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" && \
  21. tar xjf gcc-arm-none-eabi-10.3-2021.07-$(uname -m)-linux.tar.bz2 && \
  22. rm gcc-arm-none-eabi-10.3-2021.07-$(uname -m)-linux.tar.bz2 && \
  23. cd gcc-arm-none-eabi-10.3-2021.07/bin/ && \
  24. rm -rf ../share && \
  25. for file in * ; do ln -s "${PWD}/${file}" "/usr/bin/${file}" ; done && \
  26. cd / && arm-none-eabi-gcc -v && arm-none-eabi-gdb -v
  27. RUN wget --progress=dot:giga -O - https://bootstrap.pypa.io/pip/2.7/get-pip.py | python2 && \
  28. pip install --no-cache-dir lxml==4.6.3
  29. RUN git clone https://github.com/rusdacent/hex2dfu.git && \
  30. cd hex2dfu && gcc hex2dfu.c ED25519/*.c -o hex2dfu && mv ./hex2dfu /usr/local/bin/hex2dfu && \
  31. hex2dfu -h
  32. RUN git clone --depth 1 --branch v0.4.1 https://github.com/atomicobject/heatshrink.git && \
  33. cd heatshrink && make && mv ./heatshrink /usr/local/bin/heatshrink
  34. COPY entrypoint.sh syntax_check.sh /
  35. RUN chmod +x /syntax_check.sh
  36. ENTRYPOINT ["/entrypoint.sh"]