craneoperator icon indicating copy to clipboard operation
craneoperator copied to clipboard

Refactor to multi-stage build and latest ruby container

Open TheBay0r opened this issue 6 years ago • 3 comments

Hi @parabuzzle I was experimenting around with multi stage builds in docker and I'm quite satisfied with the results of it. When using the new Dockerfile the image uncompressed image size of craneoperator drops from 388MB down to 124MB

I'm not a really sure why I need the bundle install in the "running"-container. If I don't put it there, in complains that some gems need to be installed first although they are all available in the vendor/ folder. Maybe you can give me some input on that, since I'm not familiar with ruby/gem!?

Other than that everythings seems to be working fine on my machine 🙂

TheBay0r avatar Apr 24 '18 09:04 TheBay0r

This is awesome! it was on my bucket list to move my stuff to multi-stage builds.. I'll see what's going on with the gem install.. bundler can be finicky.

parabuzzle avatar Apr 24 '18 16:04 parabuzzle

@parabuzzle any news about this?

TheBay0r avatar Sep 12 '18 14:09 TheBay0r

since i am already stalking this repository: multistage builds are a good idea. with ruby 2.6 this might be just unnecessary complexity, as bundler is part of ruby with 2.6

scones avatar Feb 18 '19 23:02 scones