Closed DrMurx closed 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.
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.
ruby:2.4
is currently based on Debian jessie which has been superseded by stretch. It's slightly smaller, but might be near EOL too. The advantage could be that, despite its size, it's popular and since other projects also use it as a base, chances are higher that the expensive layers are already downloaded.ruby:2.4-slim-stretch
is way smaller. I could imagine that it's a base image that gives a good compromise between features and size. I'll check that.ruby:2.4-alpine3.7
is even smaller, and I'll check this too.Apart from the bloated base image, do you see other concerns?
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.
Here we go...
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
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.