Created
May 24, 2019 19:39
-
-
Save jhgorse/55031620e4ffc807babf19e9c4614e19 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:16.04 | |
# Install build dependencies (and vim for editing) | |
RUN apt-get -qq update \ | |
&& apt-get install -y git build-essential wget make libncurses-dev flex bison gperf python python-serial python-dev libssl-dev libffi-dev vim \ | |
&& apt-get clean \ | |
&& wget https://bootstrap.pypa.io/get-pip.py \ | |
&& python get-pip.py \ | |
&& ln -s /usr/local/bin/pip /usr/bin/pip \ | |
&& pip install --upgrade setuptools\ | |
&& pip install --upgrade future \ | |
&& pip install --upgrade cryptography \ | |
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | |
# Create some directories | |
RUN mkdir -p /esp \ | |
&& mkdir /esp/project | |
# Get the ESP32 toolchain and extract it to /esp/xtensa-esp32-elf | |
RUN wget -O /esp/esp-32-toolchain.tar.gz https://dl.espressif.com/dl/xtensa-esp32-elf-linux64-1.22.0-80-g6c4433a-5.2.0.tar.gz \ | |
&& tar -xzf /esp/esp-32-toolchain.tar.gz -C /esp \ | |
&& rm /esp/esp-32-toolchain.tar.gz | |
# Install ESP-IDF | |
WORKDIR /esp | |
RUN git clone --recurse-submodules https://github.com/pycom/pycom-esp-idf esp-idf \ | |
&& pip install -r /esp/esp-idf/requirements.txt | |
# Setup IDF_PATH | |
ENV IDF_PATH /esp/esp-idf | |
# Add the toolchain binaries to PATH | |
ENV PATH /esp/xtensa-esp32-elf/bin:$PATH | |
# This is the directory where our project will show up | |
WORKDIR /esp/project |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment