Node_modules empty on host but exists in container

Hello,

I’m trying to setup a node environment for my app.
I’ve hit a bit of a problem that I can’t work out.

I have an entrypoint script that runs yarn when I start the container to take care of any dependencies. I can see from inspecting the container that all the deps are installed and the node server boots as expected.

My problem is that whilst a node_modules directory is created on the host, it appears to be empty. This causes an issue with my tool chain (atom + eslint / mocha). I don’t want to install eslint/mocha globally - I want to use the one that’s installed in the container from the host.

I have put a gist together with the relevant parts:

Please could you advise me on what I need to change to get this to work as expected.