Closed SpringMT closed 1 year ago
The Rails default dockerfile assume you only need node/bun at build time. It seems you need it at runtime which is more the exception, not the rule.
It's fine for you to modify your Dockerfile. The default Dockerfile tries to cover most use cases but it's impossible to cover all use cases. I don't think this should be added to the default Dockerfile.
I use
boostrap
gem with Rails 7.1 andbun
.bootstrap
usesexecjs
gem.When I run
rails s
with the Dockerfile generated byrails new
, the rails app fails with the following error.This error occurs because
bun
binary does not exist. This error can be fixed by modifying the Dockerfile as shown below.This Dockerfile is generated by Rails. https://github.com/rails/rails/blob/2d271a4b901e7a7dae8ba4e5e83edfebdee278e8/railties/lib/rails/generators/rails/app/templates/Dockerfile.tt#L88-L91
Is the modification that resolves this error acceptable to submit in the Rails?