feat: Add Colima Docker runtime support for macOS users#575
feat: Add Colima Docker runtime support for macOS users#575AhmedAbdulrahman wants to merge 4 commits intoAutoMaker-Org:v0.13.0rcfrom
Conversation
Introduce APP_HOST variable to allow custom hostname configuration for the web server. Default to localhost if VITE_HOSTNAME is not set. Update relevant URLs and CORS origins to use APP_HOST, enhancing flexibility for local development and deployment. This change improves the application's adaptability to different environments.
Auto-detect Colima socket locations when Docker daemon is not accessible via default paths. This enables macOS users who prefer Colima over Docker Desktop to use the Docker modes seamlessly. Changes: - Add Colima socket detection in check_docker() - Check multiple Colima socket paths (~/.config/colima, ~/.colima) - Export DOCKER_HOST when Colima socket is found - Display runtime indicator (Colima) in Docker mode headers - Add helpful error messages for Colima users - Update help text to document Colima support
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. 📝 WalkthroughWalkthroughCentralizes host via APP_HOST, adds COMPOSE_CMD with detect_compose_cmd(), auto-detects Colima and sets DOCKER_HOST/DOCKER_RUNTIME, standardizes compose invocations across lifecycle commands, and updates URLs, health checks, messaging, and HISTORY accordingly. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary of ChangesHello @AhmedAbdulrahman, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request adds excellent support for the Colima Docker runtime on macOS, which will be a great improvement for users who prefer it over Docker Desktop. The changes are well-implemented, with automatic detection of Colima sockets, clear user feedback, and updated documentation. The introduction of detect_compose_cmd to handle both docker compose and docker-compose is a solid addition that improves script robustness.
I have one suggestion to slightly improve the efficiency of the Colima detection logic by ensuring it only runs on macOS systems. Overall, this is a valuable feature addition.
| for sock in "${colima_sockets[@]}"; do | ||
| if [ -S "$sock" ]; then | ||
| export DOCKER_HOST="unix://$sock" | ||
| if docker info &> /dev/null 2>&1; then | ||
| DOCKER_RUNTIME="colima" | ||
| socket_found=true | ||
| echo "${C_GREEN}✓${RESET} Using Colima Docker socket: $sock" | ||
| break | ||
| fi | ||
| fi | ||
| done |
There was a problem hiding this comment.
The loop to detect Colima sockets currently runs on all operating systems. While harmless on non-macOS systems, it's more efficient and clearer to scope this check only to macOS, as Colima is a macOS-specific tool.
| for sock in "${colima_sockets[@]}"; do | |
| if [ -S "$sock" ]; then | |
| export DOCKER_HOST="unix://$sock" | |
| if docker info &> /dev/null 2>&1; then | |
| DOCKER_RUNTIME="colima" | |
| socket_found=true | |
| echo "${C_GREEN}✓${RESET} Using Colima Docker socket: $sock" | |
| break | |
| fi | |
| fi | |
| done | |
| if [ "$IS_MACOS" = true ]; then | |
| for sock in "${colima_sockets[@]}"; do | |
| if [ -S "$sock" ]; then | |
| export DOCKER_HOST="unix://$sock" | |
| if docker info &> /dev/null 2>&1; then | |
| DOCKER_RUNTIME="colima" | |
| socket_found=true | |
| echo "${C_GREEN}✓${RESET} Using Colima Docker socket: $sock" | |
| break | |
| fi | |
| fi | |
| done | |
| fi |
Summary
Adds automatic detection and support for Colima as an alternative Docker runtime on macOS. Users running Colima instead of Docker Desktop can now use Docker modes without manual configuration.
Problem
macOS users who use Colima (a lightweight Docker Desktop alternative) couldn't use the Docker modes in the launcher because the script only checked the default Docker socket path (
/var/run/docker.sock), which doesn't exist when using Colima.Solution
Enhanced the
check_docker()function to:DOCKER_HOSTto the Colima socketChanges
start-automaker.shDOCKER_RUNTIMEvariable to track which runtime is in usecheck_docker()to probe Colima socket paths:~/.config/colima/default/docker.sock~/.colima/default/docker.sock~/.colima/docker.sockTesting
Screenshots
When Colima is detected:
Summary by CodeRabbit
New Features
Improvements
✏️ Tip: You can customize this high-level summary in your review settings.