Use Yarn within a docker that is hosting a git submodule

I have a development environment git repo that includes all the various components of my app as submodules, and each of these submodules have their own docker containers which mount the folder as a volume.

Some of the submodules require each other as well, so to reduce the confusion I simply have them listed in my package.json

{
 "dependencies": {
    //...
    "myapp-common": "https://path-to-my-repo.git",
   }
}

This works fine, except for when I need to run yarn from within my docker. As I'm using the likes of node-sass different packages are installed depending on the OS yarn is running in.

The problem I'm running into is when I run yarn install etc, I get this error:

root@ea69cb8f4e7f:/app# yarn
yarn install v1.10.1
[1/4] Resolving packages...
[2/4] Fetching packages...
error Command failed.
Exit code: 128
Command: git
Arguments: ls-remote --tags --heads https://path-to-my-repo.git
Directory: /app
Output:
fatal: Not a git repository: ../.git/modules/myapp
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

Any ideas how to get around this?