I am using vs-code devcontainer feature to create a containerized development environment of the following setup:
root_folder (main git repository)
|- .git
|- docker-compose.yml
|- @myapi-submodule (django python API)
|- .devcontainer.json
|- @myclient-submodule (react js client)
|- .devcontainer.json
In the docker-compose.yml
I create 2 services respectively api
and client
and mount their corresponding submodule folder.
I can then "Open Folder in Container..." in 2 separate windows and everything works great except for git. I need to be able to make changes, commit them change branches... from the container but since only the submodule folder is mounted I can't use git at all.
What are my options in this scenario ? How can I modify the submodule from the container without the parent folder ?