Skip to content

Commit

Permalink
Implement Docker best practices on esp32 qemu image (#10004)
Browse files Browse the repository at this point in the history
Some of these best practices are:
* Pin versions
* Avoid additional packages installation
* Clean all missing after apt command
* Clone one depth history level

Signed-off-by: Victor Morales <[email protected]>
  • Loading branch information
electrocucaracha authored and pull[bot] committed Oct 12, 2021
1 parent eb2faaa commit 5529001
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
18 changes: 13 additions & 5 deletions integrations/docker/images/chip-build-esp32-qemu/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
ARG VERSION=latest
FROM connectedhomeip/chip-build-esp32:${VERSION}

RUN set -x \
&& apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -fy --no-install-recommends \
ninja-build=1.10.0-1build1 \
git=1:2.25.1-1ubuntu3.2 \
libgcrypt20-dev=1.8.5-5ubuntu1.1 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/ \
&& : # last line

WORKDIR /opt/espressif/qemu
# Setup QEMU emulator for ESP32 platform
RUN set -x \
&& mkdir -p /opt/espressif \
&& git clone --progress --depth 1 --branch esp-develop-20210220 https://github.com/espressif/qemu.git /opt/espressif/qemu-src \
&& mkdir -p /opt/espressif/qemu \
&& (cd /opt/espressif/qemu \
&& git clone --depth 1 -b esp-develop-20210220 https://github.com/espressif/qemu.git ../qemu-src \
&& ../qemu-src/configure --target-list=xtensa-softmmu --enable-debug --enable-sanitizers --disable-strip --disable-user --disable-capstone --disable-vnc --disable-sdl --disable-gtk \
&& make -j8) \
&& make -j8 \
&& : # last line

ENV QEMU_ESP32_DIR=/opt/espressif/qemu
Expand Down
2 changes: 1 addition & 1 deletion integrations/docker/images/chip-build/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.5.6
0.5.7

0 comments on commit 5529001

Please sign in to comment.