Hacker News new | ask | show | jobs
by chusk3 2636 days ago
You don't have to have separate dockerfiles. If you use multistage builds, you can name the specific terminal stages and then invoke them with 'docker build -t stagename', which will reuse the build cache as you'd expect. I've done this to export multiple app containers from a monorepo.
1 comments

Yo, their example has multiple stages.
I think they're talking about intermediates, which wouldn't have to be rebuilt every time.