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

Reduce size of Linux images #718

Merged
merged 7 commits into from
Nov 18, 2016
Merged

Reduce size of Linux images #718

merged 7 commits into from
Nov 18, 2016

Conversation

tas50
Copy link
Contributor

@tas50 tas50 commented Nov 17, 2016

In response to issue #717

The kernel I noticed myself. The others are care of boxcutter. Thanks folks:

  • On Ubuntu make sure we cleanup kernels version 4.X instead of just 3.X. This frees up 200+ megs on disk and 50 megs on the image
  • Cleanup /var/log files. < 100k on disk
  • Purge additional packages. 4.5 megs on disk
  • Purge docs packages. 3 megs on disk
  • Purge docs
  • Purge caches
  • Whiteout not only /, but /boot

With these changes my original Ubuntu 16.04 image was 682.7MB and the final file is 481.9MB.

Signed-off-by: Tim Smith tsmith@chef.io

This drops the image size by about 50 megs

Signed-off-by: Tim Smith <tsmith@chef.io>
These packages are only relevant for pets. They don’t make sense here.

Signed-off-by: Tim Smith <tsmith@chef.io>
It’s not much, but we might as well do it

Signed-off-by: Tim Smith <tsmith@chef.io>
This is currently just libssl-doc which is about 3 megs!

Signed-off-by: Tim Smith <tsmith@chef.io>
Signed-off-by: Tim Smith <tsmith@chef.io>
Signed-off-by: Tim Smith <tsmith@chef.io>
This is a modified version of the code from boxcutter

Signed-off-by: Tim Smith <tsmith@chef.io>
@tas50 tas50 changed the title Clean up kernels on modern Ubuntu systems Reduce size of Linux images Nov 17, 2016
@cheeseplus
Copy link
Contributor

love it

@cheeseplus cheeseplus merged commit 4efd2c5 into master Nov 18, 2016
@cheeseplus cheeseplus added this to the 2.3.1 milestone Nov 18, 2016
@tas50 tas50 deleted the shrink branch June 27, 2017 05:39
@tas50 tas50 added Type: Enhancement Adds new functionality. and removed Improvement labels Jan 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Adds new functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants