Dockerfile 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. FROM ubuntu:18.04
  2. ARG DEBIAN_FRONTEND=noninteractive
  3. RUN apt-get update && apt-get install -y \
  4. apt-utils \
  5. bison \
  6. ca-certificates \
  7. ccache \
  8. check \
  9. cmake \
  10. curl \
  11. flex \
  12. git \
  13. gperf \
  14. lcov \
  15. libncurses-dev \
  16. libusb-1.0-0-dev \
  17. make \
  18. ninja-build \
  19. python3 \
  20. python3-pip \
  21. unzip \
  22. wget \
  23. xz-utils \
  24. zip \
  25. && apt-get autoremove -y \
  26. && rm -rf /var/lib/apt/lists/* \
  27. && update-alternatives --install /usr/bin/python python /usr/bin/python3 10
  28. RUN python -m pip install --upgrade pip virtualenv
  29. # To build the image for a branch or a tag of IDF, pass --build-arg IDF_CLONE_BRANCH_OR_TAG=name.
  30. # To build the image with a specific commit ID of IDF, pass --build-arg IDF_CHECKOUT_REF=commit-id.
  31. # It is possibe to combine both, e.g.:
  32. # IDF_CLONE_BRANCH_OR_TAG=release/vX.Y
  33. # IDF_CHECKOUT_REF=<some commit on release/vX.Y branch>.
  34. ARG IDF_CLONE_URL=https://github.com/espressif/esp-idf.git
  35. ARG IDF_CLONE_BRANCH_OR_TAG=master
  36. ARG IDF_CHECKOUT_REF=
  37. ENV IDF_PATH=/opt/esp/idf
  38. ENV IDF_TOOLS_PATH=/opt/esp
  39. RUN echo IDF_CHECKOUT_REF=$IDF_CHECKOUT_REF IDF_CLONE_BRANCH_OR_TAG=$IDF_CLONE_BRANCH_OR_TAG && \
  40. git clone --recursive \
  41. ${IDF_CLONE_BRANCH_OR_TAG:+-b $IDF_CLONE_BRANCH_OR_TAG} \
  42. $IDF_CLONE_URL $IDF_PATH && \
  43. if [ -n "$IDF_CHECKOUT_REF" ]; then \
  44. cd $IDF_PATH && \
  45. git checkout $IDF_CHECKOUT_REF && \
  46. git submodule update --init --recursive; \
  47. fi
  48. RUN $IDF_PATH/install.sh && \
  49. rm -rf $IDF_TOOLS_PATH/dist
  50. COPY entrypoint.sh /opt/esp/entrypoint.sh
  51. ENTRYPOINT [ "/opt/esp/entrypoint.sh" ]
  52. CMD [ "/bin/bash" ]