heroku/base-images

bcrypt not supported with heroku-16

Closed this issue · 3 comments

While using heroku-16 I attempted to install a rails 4.0 project, that project required bcrypt and upon getting to that gem it errored out, complaining that I didn't have the native extensions.

Hi! From what I can tell from the bcrypt-ruby readme, it doesn't rely on any additional OS packages. Also the following succeeded for me?

$ docker run -it --rm heroku/heroku:16-build
root@8951dcfe7580:/# gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
...
root@8951dcfe7580:/# curl -sSL https://get.rvm.io | sed -E s/\_rvm\_print\_headline/\_rvm\_version/ | bash -s stable --ruby=2.4.1
...
root@8951dcfe7580:/# gem install bcrypt
Fetching: bcrypt-3.1.11.gem (100%)
Building native extensions.  This could take a while...
Successfully installed bcrypt-3.1.11
Parsing documentation for bcrypt-3.1.11
Installing ri documentation for bcrypt-3.1.11
Done installing documentation for bcrypt after 1 seconds
1 gem installed

(The hacky sed addition is to work around rvm/rvm#4068)

As such, this sounds like more of a buildpack issue instead? (Or alternatively a determinism problem with the specific app, exposed when the cache is cleared by the buildback on stack update.)

I'd open an issue here:
https://github.com/heroku/heroku-buildpack-ruby/issues/new

Make sure to include the log output in the issue, along with Ruby and bcrypt versions.

One part of this issue is that I didn't realize these images were pre-buildpack. I assumed I could just slap these on a dockerfile and have a heroku instance. Has anyone written up a guide to buildpacking inside these images?

Ah makes sense :-)

There's #56 filed for that, plus also some multi-stage build examples (for people needing headers from the larger 16-build image) in #54 (comment)