27 lines
1.1 KiB
Markdown
27 lines
1.1 KiB
Markdown
# Task Log - Fix Test Script Killing Docker
|
|
|
|
## Actions
|
|
|
|
- **Script Logic Fix**:
|
|
- Updated `starter/test_multi_tenant.sh` to move the port check *after* `docker-compose down`.
|
|
- Added logic to check the process name before killing. If the process is `OrbStack` or `com.docker`, the script will warn instead of killing it.
|
|
|
|
## Decisions
|
|
|
|
- **Prevent Self-Destruct**: The previous script used `lsof ... | xargs kill -9` which inadvertently killed the Docker runtime (OrbStack) because it proxies the container ports. This caused the "Cannot connect to Docker daemon" error.
|
|
- **Order of Operations**: Tearing down containers first (`docker-compose down`) is the correct way to release ports held by Docker. Force killing is a last resort for zombie processes, not for the Docker daemon itself.
|
|
|
|
## Next Steps
|
|
|
|
1. **Restart OrbStack**:
|
|
- Since the previous run killed it, you must manually restart the OrbStack application.
|
|
|
|
2. **Run the Test Script**:
|
|
|
|
```bash
|
|
cd starter
|
|
./test_multi_tenant.sh
|
|
```
|
|
|
|
3. **Verify**:
|
|
- The script should now gracefully handle the port cleanup without killing the Docker daemon.
|