Advertisement
Guest User

esp32Docker

a guest
Jun 20th, 2019
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. FROM archlinux/base
  2.  
  3. # add user esp
  4. RUN useradd --user-group --create-home --shell /bin/false esp
  5.  
  6. ENV HOME=/home/esp
  7. WORKDIR $HOME/toolchain
  8.  
  9. RUN pacman --noconfirm -Sy archlinux-keyring && \
  10. pacman --noconfirm -Syu && \
  11. pacman --noconfirm -S glibc wget git gperf python2 python2-pyserial openssh core/sudo binutils gcc awk make fakeroot flex which bison python2-cryptography python2-future python2-pyparsing python2-pyelftools
  12.  
  13. RUN git clone https://aur.archlinux.org/ncurses5-compat-libs.git && \
  14. chown -R esp ncurses5-compat-libs && \
  15. cd ncurses5-compat-libs && \
  16. sudo -u esp bash -c '/usr/bin/makepkg -s --skippgpcheck' && \
  17. pacman --noconfirm -U *.pkg.tar.xz
  18.  
  19. RUN wget https://dl.espressif.com/dl/xtensa-esp32-elf-linux64-1.22.0-80-g6c4433a-5.2.0.tar.gz && \
  20. tar -xzf xtensa-esp32-elf-linux64-1.22.0-80-g6c4433a-5.2.0.tar.gz && \
  21. rm xtensa-esp32-elf-linux64-1.22.0-80-g6c4433a-5.2.0.tar.gz && \
  22. git clone https://github.com/espressif/esp-idf.git && \
  23. cd esp-idf && \
  24. git submodule update --init --recursive && \
  25.  
  26. ENV PATH "$PATH:$HOME/toolchain/xtensa-esp32-elf/bin"
  27. ENV IDF_PATH "$HOME/toolchain/esp-idf"
  28.  
  29. # RUN chown -R esp $HOME/toolchain
  30.  
  31. # Basic es setup
  32. WORKDIR /home/esp/app
  33.  
  34. # Setup directories
  35. RUN mkdir -p /home/esp/app
  36.  
  37. RUN ln -s /usr/bin/python2 /usr/bin/python
  38.  
  39. # Use user esp
  40. # USER esp
  41.  
  42. ENTRYPOINT /bin/bash
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement