This is a challenge I've seen as well. I was hoping that docker's file system would get smart enough about this so the problem would go away, but it hasn't happened yet. In the past, I've solved the situation using a combination of the following: Have the files included in the image. If the file rarely changes, you have it on a base image (or multi-stage build) to benefit from docker and buildkit's cache. Use rsync to move the files to the container or the volume (I launch a separate container with ssh server to receive the files, and have the volume shared between containers) A file watcher to run rsync when a file changed. I like this setup because it works locally, or if my docker containers are running on a VM or on a cloud VM (ssh+rsync magic FTW). Also, rsync is way faster than sending lots of files via the docker context. If you're running your application in Kubernetes, we recently open sourced a tool we build at my company to automate all of this: https://github.com/okteto/okteto.
