There's Docker buildkit: https://github.com/moby/buildkit/blob/master/frontend/dockerfile/docs/experimental.md
which has an extra option to RUN (amongst others): the --mount=type=cache.
What I couldn't figure out from the documentation is:
- where is that cache stored?
- how can one delete/inspect that?
- how does buildkit decide what cache goes where? For example if I have the same Dockerfile in two locations, will the caches be the same? What's the key for the cache?
- the ID option is still ambiguous. If I specify the same ID in different dockerfiles, will they refer to the same cache?