andsens / bootstrap-vz

Bootstrap Debian images for virtualized environments
http://bootstrap-vz.readthedocs.io/
Other
263 stars 145 forks source link

Default `minimize_size` settings for Docker #457

Closed drts01 closed 6 years ago

drts01 commented 6 years ago

To be inline with https://github.com/moby/moby/blob/e2e5d4bc9da5ba17bb2822909611f8300fdd80f0/contrib/mkimage/debootstrap, I think these settings should be the default for the Docker provider.

plugins:
  minimize_size:
    apt:
      autoclean: true
      languages: [none]
      gzip_indexes: true
      autoremove_suggests: true

I am willing to implement this, but I am not sure the best way to go about it.

andsens commented 6 years ago

Here: https://github.com/andsens/bootstrap-vz/tree/1d755abfc6b16d3b130064ad28b5f6583689b58a/manifests/examples/docker

Auto-enabling the settings would be problematic because there is no mechanism to disable them if you need to debug or have some specific needs.

An updated example would be nice. Maybe it should be featured more prominently in the docs of that provider?

drts01 commented 6 years ago

I was thinking of finding a way to provide default settings for Docker, and if setting exists in the manifest they take precedence. But then changing the behavior of a plugin for a provider may just cause confusion for a user.

Perhaps the docs and examples I added in #458 are sufficient.