You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As suggested by @simongareste, there is room for improvement for Docker Image as explained in #61 (comment) :
However, I believe you still have an issue in the repository, as the Gemfile.lock provided here states
BUNDLED WITH
2.1.4
whereas the docker image ruby:2.5 comes with bundler 1.17.2. Because of this, building the image by directly building the Dockerfile upon clone won't work :
[...]
Step 5/10 : RUN bundle install
---> Running in 6507a122ed1f
You must use Bundler 2 or greater with this lockfile.
The command '/bin/sh -c bundle install' returned a non-zero code: 20
I see a few options to fix this:
update rubygems in the Dockerfile before running bundle install: RUN gem update --system. This leads to a warning (Warning: the running version of Bundler (2.1.2) is older than the version that created the lockfile (2.1.4). We suggest you to upgrade to the version that created the lockfile by running gem install bundler:2.1.4.), but compiles successfully, and works (my consul-ui is working fine)
do not ship the Gemfile.lock in the image, by adding Gemfile.lock to the .dockerignore file (or even remove the Gemfile.lock altogether). This would lead to a variation of gems in the image, depending on the time/date of the build, which may or may not be a super idea. May I suggest, however, to lighten the image and speed up the build by removing everything that is not necessary, starting with the .git folder and a few others files? I can do a pull request for this one.
upgrade the ruby image used, to one that is using the same bundle version as the one in your Gemfile.lock. This looks messy.
rebuild and recommit the Gemfile.lock with a 1.17.x version.
other options: I'm pretty sure there are a lot more options, these are the simplest that come to mind :)
The text was updated successfully, but these errors were encountered:
So, I have a working PR for this, however it would lead to changes in the gemspec file, as it wouldn't have the .git folder anymore, thus not have access to git ls-files.
Basically, my PR would (I believe) improve the docker image produced, in terms of content and size, but lead to an less elegant way of producing the gem, so I'm not sure if it's really worth it, given that you seem to not use the image much.
@simongareste I am Ok for the change as long as it works :-)
I am Ok with:
removing the samples/* directory from spec.files (that where most of the changes are anyway)
include only what is needed for the Gem to work well
include only the files from lib/, bin/ using a simple find
This would actually decrease the size of the GEM, so, that would be a good thing.
So, feel free to do your PR, I'll be glad to review it to have a better Docker file and a better Gem
As suggested by @simongareste, there is room for improvement for Docker Image as explained in #61 (comment) :
However, I believe you still have an issue in the repository, as the Gemfile.lock provided here states
BUNDLED WITH
2.1.4
whereas the docker image ruby:2.5 comes with bundler 1.17.2. Because of this, building the image by directly building the Dockerfile upon clone won't work :
I see a few options to fix this:
The text was updated successfully, but these errors were encountered: