Skip to content

Commit 1992faa

Browse files
committed
Fix for git issue
1 parent bd235a1 commit 1992faa

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.devcontainer/devcontainer.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,11 @@
3333
// "forwardPorts": [],
3434

3535
// Use 'postCreateCommand' to run commands after the container is created.
36-
"postCreateCommand": "pip3 install --user -r requirements-dev.txt && pre-commit install",
36+
// Fix for https://www.kenmuse.com/blog/avoiding-dubious-ownership-in-dev-containers/
37+
"postCreateCommand": "git config --global --add safe.directory ${containerWorkspaceFolder}",
38+
39+
// Use 'postStartCommand' to run commands after the container is started (more frequently than create).
40+
"postStartCommand": "pip3 install --user -r requirements-dev.txt && pre-commit install",
3741

3842
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
3943
"remoteUser": "vscode"

0 commit comments

Comments
 (0)