fix: add prerequisite check and auto-install for essential tools
Issue: - Script fails with 'curl: command not found' - Assumes curl, wget, gpg are pre-installed - No graceful handling of missing prerequisites Fix: - Check for essential tools at script start: curl, wget, gpg - Auto-install missing tools via apt-get - Handle both root and non-root execution - Clear error messages if installation fails Prerequisites checked: ✓ curl - Used for downloading GPG keys, installers ✓ wget - Used for downloading Go, protoc, etc. ✓ gpg - Used for dearmoring GPG keys ✓ ca-certificates - Required for HTTPS downloads Behavior: 1. Script detects missing tools 2. Shows warning: 'Missing essential tools: curl wget gpg' 3. Attempts automatic installation via apt-get 4. If successful: continues normally 5. If failed: exits with clear error message Benefits: - ✅ Works in minimal base images - ✅ Self-healing for common missing dependencies - ✅ Clear error messages for manual intervention - ✅ No assumptions about pre-installed tools Note: Your Dockerfile includes these tools, but this adds resilience for testing in minimal environments.
V
Vacbo committed
28d5db1515e6d9e596953c7b7142d0b67b7e40ab
Parent: dc17546