Skip to content

Commit 2ab8363

Browse files
committed
Update docs
1 parent d1d9b71 commit 2ab8363

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,11 @@ You can use this with Windows Terminal profiles:
9292
},
9393
```
9494

95-
By default, `devcontainer exec` will set the working directory to be the mount path for the dev container. This can be overridden using `--work-dir`.
95+
96+
There are some other benefits of `devcontainer exec` compared to `docker exec`:
97+
- it sets the working directory to be the mount path for the dev container. This can be overridden using `--work-dir`.
98+
- it checks whether you have [configured a user in the dev container](https://code.visualstudio.com/docs/remote/containers-advanced#_adding-a-nonroot-user-to-your-dev-container) and uses this user for the `docker exec`.
99+
- it checks whether you have set up an SSH agent. If you have and VS Code detects it then VS Code will [forward key requests from the container](https://code.visualstudio.com/docs/remote/containers#_using-ssh-keys). In this scenario, `devcontainer exec` configures the exec session to also forward key requests. This enables operations against git remotes secured with SSH keys to succeed.
96100

97101
### Working with devcontainer templates
98102

0 commit comments

Comments
 (0)