In a Dockerfile, I am mounting a cache:
RUN --mount=type=cache,target=/opt/conda/pkgs \
...
I would like this mount to be valid for the duration of either
- just this RUN command
- until it is unmounted a few layers further down
Is there a way to do this?
I'm not able to find any reference in the documentation.
Try making use of the multi stage Dockerfile
For example :-