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

[build] create a clean_docker_images profile #13067

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

guillaumelambert
Copy link
Contributor

@guillaumelambert guillaumelambert commented Dec 15, 2022

SONiC image build process generates several docker images. They consume much disk space.
This space might need to be reclaimed once the SONiC image has been built to avoid disk full error messages.
Many of these docker images will not be reused at next build.

  • create a shell script to detect docker images generated during build (with a blob pattern) in order to delete them and reclaim disk space
  • declare in the Make a profile "clean_image" that points to this script

Issue #428
for example

Which release branch to backport (provide reason below if selected)

all branches are affected

A picture of a cute animal (not mandatory but encouraged)

______)%%%%%%%%.
''''-'-; % % % % %'-._ :b) \ '-. : :__)' .' .' :.::/ '.' .' o_i/ : ; : .' ''

@@ -0,0 +1,40 @@
#!/bin/sh
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you move this script under scripts directory so that the structure becomes a little more cleaner?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it seems some tests on the VM failed but I hardly believe it is due to this little modification...
Once logged in Azure pipelines website, is a bit weird.
The stage tests is in red alhough It is written "100% tests passed".
I clicked on "rerun the test stage" but I cannot see any effect.
Any hint about this ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's try a rebase on current master and see.

lguohan
lguohan previously approved these changes Dec 16, 2022
SONiC image build process generates several docker images.
They consume much disk space.
This space might need to be reclaimed once the SONiC image
has been built to avoid disk full error messages.
Many of these docker images will not be reused at next build.

- create a shell script to detect docker images generated during build
  (with a blob pattern) in order to delete them and reclaim disk space
- declare in the Make a profile "clean_image" that points to this script

Signed-off-by: Guillaume Lambert <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants