-
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.
Implement Docker best practices on k32w image (#10041)
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 <v.morales@samsung.com>
- Loading branch information
1 parent
b49c3ed
commit 2310443
Showing
2 changed files
with
19 additions
and
12 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,19 +1,26 @@ | ||
ARG VERSION=latest | ||
FROM connectedhomeip/chip-build:${VERSION} | ||
FROM connectedhomeip/chip-build:${VERSION} as build | ||
|
||
# Setup the K32W SDK | ||
RUN set -x \ | ||
&& apt-get update \ | ||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y wget unzip \ | ||
&& DEBIAN_FRONTEND=noninteractive apt-get install -fy --no-install-recommends \ | ||
wget=1.20.3-1ubuntu1 \ | ||
unzip=6.0-25ubuntu1 \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/ \ | ||
&& mkdir -p /opt/sdk \ | ||
&& cd /opt/sdk \ | ||
&& wget https://mcuxpresso.nxp.com/eclipse/sdk/2.6.4/plugins/com.nxp.mcuxpresso.sdk.sdk_2.x_k32w061dk6_2.6.4.201911251446.jar \ | ||
&& unzip com.nxp.mcuxpresso.sdk.sdk_2.x_k32w061dk6_2.6.4.201911251446.jar \ | ||
&& rm -rf com.nxp.mcuxpresso.sdk.sdk_2.x_k32w061dk6_2.6.4.201911251446.jar \ | ||
&& cd sdks \ | ||
&& unzip 1190028246d9243d9a9e27ca783413a8.zip \ | ||
&& rm -rf 1190028246d9243d9a9e27ca783413a8.zip \ | ||
&& : # last line | ||
|
||
WORKDIR /opt/sdk | ||
# Setup the K32W SDK | ||
RUN set -x \ | ||
&& wget -O /tmp/sdk.jar https://mcuxpresso.nxp.com/eclipse/sdk/2.6.4/plugins/com.nxp.mcuxpresso.sdk.sdk_2.x_k32w061dk6_2.6.4.201911251446.jar \ | ||
&& unzip /tmp/sdk.jar \ | ||
&& unzip sdks/1190028246d9243d9a9e27ca783413a8.zip -d sdks \ | ||
&& rm -rf sdks/1190028246d9243d9a9e27ca783413a8.zip \ | ||
&& : # last line | ||
|
||
FROM connectedhomeip/chip-build:${VERSION} | ||
|
||
COPY --from=build /opt/sdk/sdks/ /opt/sdk/sdks/ | ||
|
||
ENV K32W061_SDK_ROOT=/opt/sdk/sdks |
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.19 Version bump reason: Update AmebaD to not require python2 anymore | ||
0.5.20 Version bump reason: Improve K32W Docker image |