Update Dockerfile working on both x64 / ARM

Closes https://github.com/espressif/esp-idf/issues/6730
This commit is contained in:
Tomas Sebestik
2021-08-13 09:11:42 +02:00
committed by bot
parent 76a44106aa
commit d22795ea56
5 changed files with 36 additions and 28 deletions

View File

@@ -3,7 +3,9 @@ FROM ubuntu:20.04
ARG DEBIAN_FRONTEND=noninteractive
# We need libpython2.7 due to GDB tools
RUN apt-get update && apt-get install -y \
RUN : \
&& apt-get update \
&& apt-get install -y \
apt-utils \
bison \
ca-certificates \
@@ -14,22 +16,25 @@ RUN apt-get update && apt-get install -y \
git \
gperf \
lcov \
libffi-dev \
libncurses-dev \
libpython2.7 \
libusb-1.0-0-dev \
make \
ninja-build \
libpython2.7 \
python3 \
python3-pip \
unzip \
wget \
xz-utils \
zip \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/* \
&& update-alternatives --install /usr/bin/python python /usr/bin/python3 10
RUN python -m pip install --upgrade pip virtualenv
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/* \
&& update-alternatives --install /usr/bin/python python /usr/bin/python3 10 \
&& python -m pip install --upgrade \
pip \
virtualenv \
&& :
# To build the image for a branch or a tag of IDF, pass --build-arg IDF_CLONE_BRANCH_OR_TAG=name.
# To build the image with a specific commit ID of IDF, pass --build-arg IDF_CHECKOUT_REF=commit-id.
@@ -54,15 +59,17 @@ RUN echo IDF_CHECKOUT_REF=$IDF_CHECKOUT_REF IDF_CLONE_BRANCH_OR_TAG=$IDF_CLONE_B
git submodule update --init --recursive; \
fi
# Install all the required tools, plus CMake
RUN $IDF_PATH/tools/idf_tools.py --non-interactive install required \
# Install all the required tools
RUN : \
&& update-ca-certificates --fresh \
&& $IDF_PATH/tools/idf_tools.py --non-interactive install required \
&& $IDF_PATH/tools/idf_tools.py --non-interactive install cmake \
&& $IDF_PATH/tools/idf_tools.py --non-interactive install-python-env \
&& rm -rf $IDF_TOOLS_PATH/dist
&& rm -rf $IDF_TOOLS_PATH/dist \
&& :
# Ccache is installed, enable it by default
ENV IDF_CCACHE_ENABLE=1
COPY entrypoint.sh /opt/esp/entrypoint.sh
ENTRYPOINT [ "/opt/esp/entrypoint.sh" ]