I usually have a docker-compose.yml file like this
---
services:
node:
build:
context: .
volumes:
- ".:/app"
...
where I bind mount my source code into the container and whenever I need to interact with the package manager, I would shell into the container and run `yarn add/build/etc...`When doing this with pnpm, I notice that a `pnpm install` creates the `.pnpm-store` directory in `/app`, because of the bind mount, I see the directory in my source folder. I understand this is because of the limitations of how you can't hardlink across filesystems. I can easily gitignore it but I don't really see other people doing this.
Also, with this setup it seems like I'm not getting the benefit of pnpm's global store since every project would have its own local "global" store.