maybe icon indicating copy to clipboard operation
maybe copied to clipboard

Speedup docker build time

Open anonychun opened this issue 1 year ago • 1 comments

Previously individual layers within the Dockerfile installed the same some dependencies repeatedly, causing redundancy and build time increase.

This change: Moves commonly used dependencies to the base layer of the Dockerfile. Other layers now inherit these dependencies from the base layer, avoiding redundant installations. This approach leverages Docker's layering mechanism to ensure all layers have access to required dependencies while eliminating unnecessary repetition.

anonychun avatar Feb 15 '24 05:02 anonychun

Since this is using the stock standard production Dockerfile that comes with Rails - would it be better to have this upstreamed into Rails (where more eyes could get a look at it). Thoughts @anonychun ?

robzolkos avatar Feb 16 '24 18:02 robzolkos

I already created pull request to Rails, and already being merge https://github.com/rails/rails/pull/51063

anonychun avatar Feb 17 '24 01:02 anonychun