-
Notifications
You must be signed in to change notification settings - Fork 230
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
ci: Remove dangling docker layers #2017
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2017 +/- ##
=======================================
Coverage 87.77% 87.78%
=======================================
Files 214 214
Lines 36984 36984
Branches 5570 5570
=======================================
+ Hits 32464 32465 +1
+ Misses 4001 3999 -2
- Partials 519 520 +1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
@@ -78,7 +78,10 @@ jobs: | |||
|
|||
- name: Build docker image | |||
run: | | |||
docker build . --pull --file docker/Dockerfile.devito --tag devito_img --build-arg base=${{ matrix.base }} | |||
docker build . --rm --pull --file docker/Dockerfile.devito --tag devito_img --build-arg base=${{ matrix.base }} |
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.
Isn't --rm
a run option
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.
it's a build too -- it removes the dangling layers!
docker build . --pull --file docker/Dockerfile.devito --tag devito_img --build-arg base=${{ matrix.base }} | ||
docker build . --rm --pull --file docker/Dockerfile.devito --tag devito_img --build-arg base=${{ matrix.base }} | ||
|
||
- name: Remove dangling layers |
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.
So why is it needed again?
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.
~300 GB of layers on v1003 and counting, which I purged manully for now
if we pushed too much in a good week before docker-build kicks in (which does purge IIRC), we might end up saturating the hard drive
though now that I think about it, that's weird, the base image shouldn't get rebuilt each time... mh
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.
If there is ~300 GB of layers then there is something else going on probably due to
- cancelled workflow
- Dev on the machine
So this may "fix" some of it but it should be safer to have the actual machine have a safety cron job with that
@@ -107,6 +107,9 @@ jobs: | |||
tags: ${{ steps.meta.outputs.tags }} | |||
build-args: base=devitocodes/${{ matrix.base }} | |||
|
|||
- name: Remove dangling layers |
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.
I had the impression this was happening already, ok
No description provided.