Mounting a cache volume like
...
WithMountedCache("/mydir/.m2", c.CacheVolume("m2"), dagger.ContainerWithMountedCacheOpts{
Owner: "jenkins:jenkins",
}).
...
Does not seem to work. The cache is empty even though the exec step populates it every run. This is the first time I am testing a cache like this. We have a tooling container that has a bunch of build tools but it is not allowed to be root within that container. So I have to use the Owner when setting the cache. It seems to do the same thing for WithMountedDirectory too as it seems to be mounting it every time when I have an Owner set.