| Philip Zeyliger | a7e7fb6 | 2025-06-17 19:28:12 -0700 | [diff] [blame^] | 1 | # Sketch Testing Itself |
| 2 | |
| 3 | NOTE: This is an idea the Sketch developers are developing. We don't know if it works yet! |
| 4 | |
| 5 | Sketch can test itself, but it can be a bit tricky, especially when Sketch |
| 6 | depends on Docker: |
| 7 | |
| 8 | # Manual Steps |
| 9 | |
| 10 | ``` |
| 11 | # Create a throwaway SSH key |
| 12 | ssh-keygen -t ed25519 -f ~/.ssh/sketch_test_key -P "" |
| 13 | |
| 14 | # Create a VM for Sketch to run Docker in |
| 15 | limactl start --name=dockerhost --cpus=$(nproc) --memory=8 --plain --set='.ssh.localPort=2222' template://ubuntu |
| 16 | |
| 17 | # Add the key to the VM |
| 18 | ssh -F "/Users/philip/.lima/dockerhost/ssh.config" lima-dockerhost tee -a .ssh/authorized_keys < /Users/philip/.ssh/sketch_test_key.pub |
| 19 | ``` |
| 20 | |
| 21 | # What to tell Sketch |
| 22 | |
| 23 | * Mount your key with "-mount $HOME/.ssh/sketch_test_key:/sketch_test_key" |
| 24 | * Configure DOCKER_HOST to host.docker.internal:2222 with the key above. |