[FEA] Add `devcontainer/connect.sh` script that connects to running devcontainer
- Dominant language
- C++
- Stars
- 2.5k
- Forks
- 486
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 295
Description
I use this powershell script to connect to running CCCL devcontainers in wsl. This is handy for using CLI agents, which are sometimes more convenient to run in a non-vscode terminal.
The bits that detect the current container and start a new shell should be made available.
```
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$wslWorkDir = "/home/allie/code/src/cccl"
$container = wsl -e docker ps --filter status=running --latest --quiet
$dockerCmd = "docker exec -it -u coder -w /home/coder/cccl $container bash"
$cmd = "cd $wslWorkDir && exec bash -ilc '$dockerCmd'"
Write-Host "Workdir: $wslWorkDir"
Write-Host "Command: $cmd"
& wsl -e bash -lc $cmd
```
Contributor guide
Assessment
This issue has not been assessed yet.