Before I begin: This is not a post about speeding up bundle install
that runs when I build the container.
I am building a Docker application that needs to run bundle install
during runtime. It may take a while to explain this specific use-case, but the important component is: my running container will download rails projects, and run bundle install
. Currently, this takes an extremely long time (likely because of nokogiri
).
Is there a way to build my container, such that anytime my script runs bundle install
during runtime, it uses cached gems?
I am using: Docker Compose Version 3 Fargate ECS
BUNDLE_PATH
env var to vendor/bundle
The first run will be slow since it has to build up the bundle cache, but after that it should only update gems if necessary.