dieb/rails-packager bundles the gems and compiles the assets for your Rails application.
Although still experimental, its ultimate goal is to prepare everything an application
needs so you can keep compile tools and development libraries out from your final image.
Technically it's just a minimal Ubuntu-based image that includes node.js, Ruby, compile tools,
dev. libraries and a build bash script.
How it works
dieb/rails-packager requires two volumes:
/source: Rails application
/build: output directory for assets and bundle
Build happens as follows:
- Builds stuff on
- Bundle install in deployment mode
- Precompiles assets
Assuming your app lives on
./my_rails_app/ and you selected
./build/ as the output folder,
you can run the container by doing:
$ docker run --rm -ti -v $(pwd)/my_rails_app:/source -v $(pwd)/build:/build dieb/rails-packager