Hacker News new | ask | show | jobs
by heroic 2127 days ago
Split the dockerfile into 3 parts. builder image for gems. builder image for assets(nodejs and stuff). copy code from disk, gems from image one, assets from image two, into the third image. you will end up saving HUGE time
2 comments

Do you have an open source Dockerfile that demonstrates this pattern? I've used builder images before, but not multiple.
The relevant search term is "base image"

Just remember to have a process to rebuild your base image at least once a month so you pick up latest security fixes etc.

Or search for multi-stage builds
Thanks, I’m gonna try this.