vmware / kube-fluentd-operator

Auto-configuration of Fluentd daemon-set based on Kubernetes metadata
Other
319 stars 102 forks source link

Huge increase in docker image size #403

Closed gilles-o closed 1 year ago

gilles-o commented 1 year ago

Describe the bug

Well, it's not a bug per-say (everything works fine). But the resulting image increased from approx 450MB to 1.6GB

Reproduction steps

  1. for i in 0 1 2 3 do;docker pull vmware-kube-fluentd-operator:1.17.$i
  2. docker images size multiplied by 4
vmware/kube-fluentd-operator               v1.17.3      c1351c35fa41   6 days ago          1.6GB
vmware/kube-fluentd-operator               v1.17.2      cc64d99e80d1   2 weeks ago         1.59GB
vmware/kube-fluentd-operator               v1.17.1      3488a080e858   2 months ago        462MB
vmware/kube-fluentd-operator               v1.17.0      a194afe6e7d2   3 months ago        462MB

Expected behavior

a more reasonable image, around the initial size.

I think this is induced by the Dockerfile refactoring 3e30d83 that:

&& rm -rf $RUBY_PATH/lib/ruby/gems/3.1.4/cache $RUBY_PATH/lib/ruby/gems/3.1.4/doc/ /usr/share/doc /root/.bundle/cache should read: && rm -rf $RUBY_PATH/lib/ruby/gems/3.1.0/cache $RUBY_PATH/lib/ruby/gems/3.1.0/doc/ /usr/share/doc /root/.bundle/cache

Inside the resulting image: image

Just alone this would permit to divide the image size by 2. Thanks !

Additional context

No response

javiercri commented 1 year ago

Could you create a MR with this 😄. If not I will do next week

slimm609 commented 1 year ago

@gilles-o thanks for reporting this. We are looking into fixing it.

slimm609 commented 1 year ago

This has been fixed in the 1.18 release

gilles-o commented 1 year ago

Thanks folks ;-)