-
Notifications
You must be signed in to change notification settings - Fork 861
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
Run apt-get in docker builds without using any cache. #7011
Run apt-get in docker builds without using any cache. #7011
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which is the impact, of splitting the RUN
command, in term of bigger image size?
…individual RUN commands Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
…l RUN commands Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
a2fd185
to
0008660
Compare
@fab-10 I misunderstood how docker images are built and did not realize the impact in size of several run commands. I've reverted the change and use only one run command to save disk size. |
* Run apt-get in docker builds without using any cache. Split steps in individual RUN commands Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net> * use env variable for apt non-cache settings, revert split into several RUN commands Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net> * clean apt-get cache after installation to decrease docker image size Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net> --------- Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net> Signed-off-by: Justin Florentine <justin+github@florentine.us>
* Run apt-get in docker builds without using any cache. Split steps in individual RUN commands Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net> * use env variable for apt non-cache settings, revert split into several RUN commands Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net> * clean apt-get cache after installation to decrease docker image size Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net> --------- Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
* Run apt-get in docker builds without using any cache. Split steps in individual RUN commands Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net> * use env variable for apt non-cache settings, revert split into several RUN commands Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net> * clean apt-get cache after installation to decrease docker image size Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net> --------- Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net> Signed-off-by: Justin Florentine <justin+github@florentine.us>
PR description
The docker build step can fail if
apt-get
gets it's dependencies from a transparent cache (e.g. from an ISP) and this cache serves corrupted or outdated packages. This PR clears all the apt-get cache first and afterwards executes the next steps while making sure that no cache whatsoever is used.I have further split the the
RUN
command into several steps to make debugging easier, because like that the exact command that is failing while be shown. Right now we have several commands chained together and it's not always clear which of the several commands was failing.Fixed Issue(s)
fixes #7009
Thanks for sending a pull request! Have you done the following?
doc-change-required
label to this PR if updates are required.Locally, you can run these tests to catch failures early:
./gradlew build
./gradlew acceptanceTest
./gradlew integrationTest
./gradlew ethereum:referenceTests:referenceTests