| Philip Zeyliger | e0a9f72 | 2025-06-18 13:11:24 -0700 | [diff] [blame] | 1 | # Test Recipes Docker and SSH Guidelines |
| 2 | |
| 3 | ## SSH Host Access |
| 4 | - The SSH host is accessible as user "sketch" at `host.docker.internal:2222` |
| 5 | - Use the provided SSH key at `/sketch_test_key` |
| 6 | - Connection command: `ssh -i /sketch_test_key -p 2222 sketch@host.docker.internal` |
| 7 | |
| 8 | ## Docker and gvisor Installation |
| 9 | - The SSH host runs Ubuntu and requires Docker and gvisor to be installed manually |
| 10 | - Use Ubuntu's native `docker.io` package instead of Docker's official repository |
| 11 | - Install with: `sudo apt install -y docker.io docker-compose` |
| 12 | - Follow the instructions in README.md for complete installation steps |
| 13 | - Both `runc` (default) and `runsc` (gvisor) runtimes should be available |
| 14 | - Test with: `docker run --runtime=runsc --rm hello-world` |
| 15 | |
| 16 | ## Sketch Testing with Docker over SSH |
| 17 | - Configure SSH config for easy access: `Host dockerhost` pointing to the VM |
| 18 | - Use `DOCKER_HOST=ssh://dockerhost` for remote Docker access |
| 19 | - For one-shot testing: `DOCKER_HOST=ssh://dockerhost ANTHROPIC_API_KEY="key" go run ./cmd/sketch -one-shot -prompt "prompt" -verbose -unsafe -skaband-addr=""` |
| 20 | - The `-skaband-addr=""` flag bypasses sketch.dev authentication for testing |
| 21 | |
| 22 | ## Container Networking Issues |
| 23 | - When running Docker inside containers, expect networking and iptables permission issues |
| 24 | - Use `--iptables=false --bridge=none` flags for dockerd in constrained environments |
| 25 | - Consider using host networking or simplified setups for testing |
| 26 | |
| 27 | ## Package Installation |
| 28 | - Always use longer timeouts for package installations (2-5 minutes) |
| 29 | - Ubuntu package installs may show debconf warnings in non-interactive environments - this is normal |
| 30 | - Install SSH client with: `apt install -y openssh-client` |