-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
woody-apple
merged 2 commits into
project-chip:master
from
electrocucaracha:improve_mbed_img
Oct 23, 2021
Merged
Improve Mbed Docker image used by Build example - Mbed OS workflow #10297
woody-apple
merged 2 commits into
project-chip:master
from
electrocucaracha:improve_mbed_img
Oct 23, 2021
Conversation
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
electrocucaracha
requested review from
kpschoedel and
andy31415
and removed request for
kpschoedel
October 6, 2021 23:12
pullapprove
bot
requested review from
anush-apple,
balducci-apple,
bzbarsky-apple,
carol-apple,
cecille,
chrisdecenzo,
Damian-Nordic,
emargolis,
erjiaqing,
franck-apple,
harimau-qirex,
hawk248,
holbrookt,
jelderton,
jepenven-silabs,
jmartinez-silabs,
LuDuda,
mlepage-google,
msandstedt,
pan-apple,
sagar-apple,
saurabhst,
shana-apple,
vivien-apple,
woody-apple and
yufengwangca
October 6, 2021 23:12
woody-apple
approved these changes
Oct 7, 2021
electrocucaracha
force-pushed
the
improve_mbed_img
branch
from
October 21, 2021 17:25
6cd1474
to
9765f02
Compare
PR #10297: Size comparison from 342d1d3 to 9765f02 2 builds (for p6, telink)
20 builds (for efr32, k32w, linux, mbed, qpg)
12 builds (for esp32, nrfconnect)
|
/rebase |
ping @electrocucaracha - I can speed this along if you up the docker version :) |
woody-apple
force-pushed
the
improve_mbed_img
branch
from
October 22, 2021 16:29
9765f02
to
5d5429b
Compare
PR #10297: Size comparison from a0cd671 to 5d5429b 8 builds (for k32w, p6, qpg, telink)
|
electrocucaracha
force-pushed
the
improve_mbed_img
branch
from
October 22, 2021 18:58
5d5429b
to
ca6042e
Compare
PR #10297: Size comparison from e282eec to ca6042e 35 builds (for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
|
woody-apple
approved these changes
Oct 23, 2021
PR #10297: Size comparison from e282eec to bdc4cad Increases above 1.0% from e282eec to bdc4cad:
8 builds (for k32w, p6, qpg, telink)
|
/rebase |
woody-apple
force-pushed
the
improve_mbed_img
branch
from
October 23, 2021 01:11
bdc4cad
to
ce58f09
Compare
/rebase |
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]>
woody-apple
force-pushed
the
improve_mbed_img
branch
from
October 23, 2021 01:15
ce58f09
to
0a77bda
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
Hadolint tool helps to build Docker images following best practices. Using those guidelines can help to reduce the size of the image and speed up the pulling process during the CI execution.
Change overview
This change uses the multi-stage builds feature to get the Arm Mbed OS, ARM Toolchain and OpenOCD sources in one stage and installing it in the following stage. As result the image size has been reduced from 4.05GB to 3.18GB
Testing
This was tested locally using the act tool (
$ act -j mbedos
) using the Docker image built with these changes.