CiscoCloud / docker-logstash

4 stars 2 forks source link

Consider forking keithchambers/docker-logstash #1

Closed keithchambers closed 9 years ago

keithchambers commented 9 years ago

This probably creates a smaller image: https://github.com/keithchambers/docker-logstash/blob/master/Dockerfile

Maybe we can fork this repo and iterate from there?

ghost commented 9 years ago

Yes, I was thinking about that either but one thing caught my attention:

Notice: This image will probably soon be deprecated in favor of our even smaller Alpine Linux based image.

It was posted on https://github.com/progrium/busybox I'm not sure now if it's worthwhile to use this image.

ghost commented 9 years ago

I have reduced my image from 432.1 MB to 297.9 MB in size, which seems to be reasonable now: --- /opt --- 161.0MiB [##########] /logstash 150.1MiB [######### ] /jdk1.8.0_45

brucemartins commented 9 years ago

Any reason we couldn't replace the jdk with the jre? It would reduce the total by about 25%

ghost commented 9 years ago

@brucemartins, sorry for the long response. Actually, with the tag latest we already download Oracle Java Server JRE: https://registry.hub.docker.com/u/jeanblanchard/busybox-java/ For example, we can download JRE-8u45 from the official site. When we untar it, the directory will still have the name jdk1.8.0_45/, same as in the Docker image. We could take JRE7 to reduce the image size, but it's recommended to use the latest version of Java for Logstash.

An idea came into my mind to remove some unused Logstash plugins:

--- /opt/logstash/vendor/bundle/jruby/1.9/gems
                        /..
   21.0MiB [##########] /logstash-filter-geoip-0.1.9
   19.1MiB [######### ] /logstash-output-elasticsearch-0.2.4-java
   14.9MiB [#######   ] /jruby-kafka-1.4.0-java
    6.4MiB [###       ] /aws-sdk-v1-1.61.0
    6.4MiB [###       ] /ruby-maven-libs-3.1.1
    5.1MiB [##        ] /nokogiri-1.6.6.2-java
    2.7MiB [#         ] /backports-3.6.4
    2.7MiB [#         ] /mail-2.6.3

I will think about that.

ghost commented 9 years ago

I am closing this issue now as I think we've got it covered. Feel free to open a new one in case of any problems.