Closed lsorber closed 5 months ago
I'd add this somewhere in the Dockerfile
instead of in the devcontainer.json
and use system
instead of global
:
RUN git config --system --add safe.directory '*'
Reasons:
docker compose run dev
system
will add the config to /etc/gitconfig
. In case global
is used it will be added to ~/.gitconfig
. But this will make VSCode fail to share gitconfig / credentials.
Problem description and solution: https://www.kenmuse.com/blog/avoiding-dubious-ownership-in-dev-containers/