#`WithMountedCache` vs `RUN --mount=type=cache` scope semantics?

1 messages · Page 1 of 1 (latest)

tame gyro
#

In a Dockerfile, if we want to use a cache mount, we have to explicitly prepend each relevant RUN script with the --mount=type=cache flag.
In Dagger, WithMountedCache() isnt tied to RUN (WithExec). Does that mean any subsequent WithExec will have the path mounted and therefore to reproduce the Dockerfile approach, we would have to WithoutMount after each WithExec ?