sstarcher / docker-sensu

Dockerized Sensu - Client, Server, Api
MIT License
103 stars 72 forks source link

Base on ruby2.4 image #64

Closed DrMurx closed 6 years ago

DrMurx commented 6 years ago

Ubuntu Zesty is end of life and not supported anymore. Also, having a distribution with Ruby 2.3 and Sense with embedded 2.4 causes issues when additional gems are required for plugins.

This PR uses the official ruby:2.4 image based on the latest Debian (stretch), and updates the entry point script to consider all ruby gem paths properly.

I also took the chance to simplify the Dockerfile layering. For my understanding, there's not much benefit of multiple RUN steps in term of reduced build time or less updates of lower layers, compared to the overhead of more layers.

sstarcher commented 6 years ago

This image is 967MB vs the old image being 178MB. It looks like the base container ruby:2.4-stretch is 880MB and is not a good candidate to base from.

DrMurx commented 6 years ago

I understand your concerns. I'll look into alternatives, but I'd still argue that using one of the official ruby images is the way to go for a reliable image.

Apart from the bloated base image, do you see other concerns?

sstarcher commented 6 years ago

The image bloat is my only complaint for the PR. The ruby:2.4-slim-stretch looks fine to use. Alpine is not a good choice as this container requires development libs when it builds gems from sources and alpine requires different libraries and users are more familiar with debian.

DrMurx commented 6 years ago

Here we go...

sstarcher commented 6 years ago

I still find it bothersome that this increases the image size by 100mb, but it's more acceptable. If anyone objects to it and would like to improve it by basing it off of a newer ubuntu and setting up ruby correctly feel free to put in a PR.

@DrMurx Thanks for the PR