# Multi-stage build --no-cache from intermediate?

**URL:** <https://forums.docker.com/t/multi-stage-build-no-cache-from-intermediate/80640>\
**Category:** Feature Requests\
**Created:** [September 3, 2019, 3:36am UTC](https://forums.docker.com/t/multi-stage-build-no-cache-from-intermediate/80640 "2019-09-03T03:36:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bubthegreat](https://avatars.discourse-cdn.com/v4/letter/b/d2c977/32.png) [@bubthegreat](https://forums.docker.com/u/bubthegreat)\
**Post date:** [September 3, 2019, 3:36am UTC](https://forums.docker.com/t/multi-stage-build-no-cache-from-intermediate/80640/1 "2019-09-03T03:36:47Z")

</div>

I’ve been searching through the documentation and can’t seem to find a way to do make multistage builds efficient when needing to rebuild without a cache from a specific step. I’m in a situation where I have a multistage build that installs a bunch of prerequisite on one image, but the secondary stage may need to be rebuilt without a cache. The primary stage will never need to be rebuilt without the cache.

I would like to leverage multistage builds for production because it makes it significantly simpler to build a consistent image, but when I need to rebuild the second portion of the image, if I use --no-cache it will rebuild both stages of the build.

Is there a way to rebuild only the second/third/etc stage of a multistage build from cache, without also rebuilding the first stage without cache, or am I stuck going back to the old methods of using multiple dockerfiles, one for the first stage, another for subsequent stages?

Thanks in advance,

-Mike
