-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve ESP32 Docker image used by Build example - ESP32 workflow (#9999
) * Implement Docker best practices on esp32 image Some of these best practices are: * Multi-stage builds * Pin versions * Avoid additional packages installation * Clean all missing after apt command Signed-off-by: Victor Morales <[email protected]> * Bump Docker images version to 0.5.8 Signed-off-by: Victor Morales <[email protected]>
- Loading branch information
1 parent
dc0593c
commit 1401358
Showing
2 changed files
with
20 additions
and
10 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,27 @@ | ||
ARG VERSION=latest | ||
FROM connectedhomeip/chip-build:${VERSION} | ||
FROM connectedhomeip/chip-build:${VERSION} as build | ||
|
||
# Setup the ESP-IDF | ||
RUN set -x \ | ||
&& apt-get update \ | ||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y python libgcrypt20-dev \ | ||
&& mkdir -p /opt/espressif \ | ||
&& cd /opt/espressif \ | ||
&& git clone --progress -b v4.3 https://github.com/espressif/esp-idf.git \ | ||
&& cd esp-idf \ | ||
&& git submodule update --init --progress \ | ||
&& IDF_TOOLS_PATH=/opt/espressif/tools ./install.sh \ | ||
&& DEBIAN_FRONTEND=noninteractive apt-get install -fy --no-install-recommends \ | ||
git=1:2.25.1-1ubuntu3.2 \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/ \ | ||
&& : # last line | ||
|
||
RUN set -x \ | ||
&& git clone --depth 1 --recursive -b v4.3 https://github.com/espressif/esp-idf.git /tmp/esp-idf \ | ||
&& : # last line | ||
|
||
FROM connectedhomeip/chip-build:${VERSION} | ||
|
||
ENV IDF_PATH=/opt/espressif/esp-idf/ | ||
ENV IDF_TOOLS_PATH=/opt/espressif/tools | ||
|
||
COPY --from=build /tmp/esp-idf /opt/espressif/esp-idf | ||
|
||
# Setup the ESP-IDF | ||
WORKDIR /opt/espressif/esp-idf | ||
RUN set -x \ | ||
&& ./install.sh \ | ||
&& : # last line |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.5.7 | ||
0.5.8 |