spec icon indicating copy to clipboard operation
spec copied to clipboard

Monorepo and git

Open theonelucas opened this issue 3 years ago • 2 comments

Hi, I have a monorepo with a few projects in it, two of which are api and ui, each with it's own Dockerfile.

I can work on each service separately, but I don't have access to git as the .git directory is up in the dir tree, and outside the specific container.

Is there a recommended way to tackle this issue and have access to the git repo inside the container?

theonelucas avatar Oct 23 '23 18:10 theonelucas

Hi 👋

Have you looked at #workspacefolder-and-workspacemount ?

To use git and a monorepo in a dev container, you can use the workspaceMount and workspaceFolder properties in the devcontainer.json file to mount the parent directory of the project as a volume in the container and set the default workspace folder to a sub-folder under it.

samruddhikhandale avatar Oct 24 '23 22:10 samruddhikhandale

@samruddhikhandale Can you help me with my case it is similar to @theonelucas How to use Git in a monorepo with multiple dev containers for subfolders? #686

stevedanomodolor avatar Jan 13 '26 14:01 stevedanomodolor