I'll copy-paste my message from #docker here.
Maybe that's a weird question, but does dockerBuild cache intermediate instructions results the same way as if they would have been executed via the Dagger API? This was my assumption.
I am facing this issue (have been facing from the very beginning with Dagger): I am keeping most of my base build steps in Dockerfile and hand it to Dagger to perform some fine-grained dynamic steps after the main bulk has been finished.
And apparently it hasn't been cached for this entire time (like 8 moths lol).
I am experiencing full rebuilds of the dockerBuild step quite frequently (even when doing innocent changes to other projects in my monorepo). I think it is cached across dagger call invocations within the same GitHub Actions run, but not across runs (commits).
@solomon could you helm me out here, please? I wasn't able to find any docs on this.
related issue? https://github.com/dagger/dagger/issues/6170