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] remove duplicate code from dockers cleanup code #13224

Closed
wants to merge 2 commits into from

Conversation

kv-y
Copy link
Contributor

@kv-y kv-y commented Jan 1, 2023

Why I did it

We use a script post_run_cleanup from sonic-build-hooks to cleanup all docker containers (except sonic-slave-xxx-user). So we can remove unneeded cleanup code from Dockerfile.j2 templates.

How I did it

Run

apt-get -s clean -y
apt-get -s autoclean -y
apt-get -s autoremove -y

in post_run_cleanup without -s flag (this flag means dry run)
and remove apt cleanup code from Dockerfile templates.

@kv-y
Copy link
Contributor Author

kv-y commented Jan 7, 2023

It seems we still need to do apt cleanup before post_run_buildiinfo.
Otherwise we will collect info about additional deb packages that removed via apt-get autoremove.

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.

None yet

1 participant