I can’t say I fully understand osxfs - and I also don’t use npm-link for cli apps unless I’m testing them. This what I could find in the documentation
Mounting/unmounting OS X volumes that are also bind mounted into containers may result in unexpected behavior in those containers. Unmount events are not supported. Mount export support is planned but is still under development.
Symlinks are shared unmodified. This may cause issues when symlinks contain paths that rely on the default case-insensitivity of the default OS X file system, HFS+.
Symlinks, hardlinks, socket files, named pipes, regular files, and directories are supported. Socket files and named pipes only transmit between containers and between OS X processes – no transmission across the hypervisor is supported,
Honestly I’ve never thought about running
CMD npm link in a Dockerfile, but there’s other ways to accomplish the same goal. For example, I use the glances (system monitor) with docker, so I just wrote an
alias glances=docker run ... in my dot files. I’ve also worked with and contributed to a a few cli apps using node/npm, so I’m familiar with 3 or 4 different ways to do it. I can build a node app to run docker via the cli, but I’ve never attempted using a docker container for the base of an npm cli app