Reputation: 1472
I need to link an external folder, on the host, while building a docker image. I do not want to copy this folder due to its large size, and it is shared over the hosts that run the container.
What is the proper way to do this? I am planning to mount this folder when running the container.
Upvotes: 0
Views: 492
Reputation: 1525
You can't do it with the default Docker build engine. But you can do it with Docker buildkit using the new syntax: https://github.com/moby/buildkit/blob/master/frontend/dockerfile/docs/syntax.md#build-mounts-run---mount
The instructions on how to enable buildkit is on the same page
Upvotes: 1