pblittle / docker-logstash

Docker image for Logstash 1.4
https://hub.docker.com/r/pblittle/docker-logstash
MIT License
236 stars 90 forks source link

The image can't be run without internet connection #97

Closed floriankammermann closed 3 years ago

floriankammermann commented 9 years ago

Sadly I have no internet connection, where i run the image. The container stops then at this log out: wget https://gist.githubusercontent.com/pblittle/8994708/raw/insecure-logstash-forwarder.key -O /opt/ssl/logstash-forwarder.key

pblittle commented 9 years ago

@floriankammermann, I'm sorry for not getting back to you sooner. I am just now returning from a few days of travel.

Thank you for submitting the issue. I'll take a look at it shortly and will get back to you with my thoughts.

gtmtech commented 9 years ago

+1 Agreed - there's no way you could run an image like this in operations as it tries to update from github - in most environments its good practice to control outbound traffic, and not have any outbound traffic from your data layer at all.

It would be much better to have an image which is built and self-contained and could be run anywhere. I imagine its still useful to devs playing around locally though.

pblittle commented 9 years ago

@gtmtech I definitely see value in this. I haven't had much time to think about the best way to implement the change. One simple solution is to do a quick ping test for an internet connection. If a connection exists, download the config files, otherwise proceed without failing. Something like:

PING_HOST="8.8.8.8"

ping -c 1 $PING_HOST > /dev/null

if [ $? != 0 ]; then
 ...
fi

Does that fit your use case? There might be an easier solution that I'm not thinking of.

-pblittle