I am looking for a way to create a new mount point for a directory similar to the mount --bind
command in Linux.
In Linux, mount --bind
creates a so-called bind mount which takes an existing directory tree and replicates it under a different point. The directories and files in the bind mount are the same as the original. Any modification on one side is immediately reflected on the other side, since the two views show the same data.
A symlink won't work because I'm working with Docker and Docker disallows symlinks when building images from a Dockerfile. I prefer solutions that work on macOS Sonoma.