Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Mbed Docker image used by Build example - Mbed OS workflow #10297

Merged
merged 2 commits into from
Oct 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 21 additions & 18 deletions integrations/docker/images/chip-build-mbed-os/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,34 +1,37 @@
ARG VERSION=latest
FROM connectedhomeip/chip-build:${VERSION}
FROM connectedhomeip/chip-build:${VERSION} as build

# ------------------------------------------------------------------------------
# Install system tools via apt
RUN set -x \
&& apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -fy \
python3-setuptools \
python3-usb \
software-properties-common \
build-essential \
astyle \
mercurial \
&& rm -rf /var/lib/apt/lists \
&& DEBIAN_FRONTEND=noninteractive apt-get install -fy --no-install-recommends \
wget=1.20.3-1ubuntu1 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/ \
&& : # last line

SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# ------------------------------------------------------------------------------
# Install openocd
RUN set -x \
&& mkdir -p /opt/openocd \
&& wget -O - --progress=dot:giga https://github.com/cypresssemiconductorco/openocd/releases/download/release-v4.2.0/openocd-4.2.0.1430-linux.tar.gz | tar --strip-components=1 -xz -C /opt/openocd \
&& : # last line

FROM connectedhomeip/chip-build:${VERSION}

COPY --from=build /opt/openocd/ /opt/openocd/

# ------------------------------------------------------------------------------
# Install Python modules
RUN set -x \
&& pip3 install --no-cache-dir -U mbed-cli mbed-tools \
&& pip3 install --no-cache-dir -U mbed-cli==1.10.5 mbed-tools==7.44.0 \
&& : # last line

# ------------------------------------------------------------------------------
# Install openocd
# Configure mbed build system
RUN set -x \
&& (mkdir -p /opt/openocd \
&& cd /opt/openocd \
&& wget --progress=dot:giga https://github.com/cypresssemiconductorco/openocd/releases/download/release-v4.2.0/openocd-4.2.0.1430-linux.tar.gz \
&& tar --strip-components=1 -xzf openocd-4.2.0.1430-linux.tar.gz \
&& rm openocd-4.2.0.1430-linux.tar.gz) \
&& mbed config -G GCC_ARM_PATH /opt/mbed-os-toolchain/gcc-arm-none-eabi-9-2019-q4-major/bin/ \
&& mbed toolchain -G -s GCC_ARM \
&& : # last line

# ------------------------------------------------------------------------------
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.20 Version bump reason: Improve K32W Docker image
0.5.22 Version bump reason: Implement Docker best practices on mbed OS