3 ms·
It makes sense that mounting a volume requires understanding a user mapping tbh. I think the answer is twofold: a) Many problems solvable with a volume can be
by staticassertion 5y ago
It makes sense that mounting a volume requires understanding a user mapping tbh. I think the answer is twofold:
a) Many problems solvable with a volume can be solved with a bind-mount, cache-mount, etc [0].
b) In the event that you actually need to map in a user-file, wrap the docker command in a script that manages the logic. At this point you're writing a system tool that's doing things outside of the context of a container - it's not really docker's fault that it doesn't try to make this trivial.
[0] https://vsupalov.com/buildkit-cache-mount-dockerfile/ https://vsupalov.com/buildkit-cache-mount-dockerfile/