Skip to content

Commit 1adc774

Browse files
akshithgclaude
andauthored
docs: add Colima and docker-buildx setup instructions for macOS (#474)
macOS users using Colima instead of Docker Desktop were hitting missing buildx errors and had no documentation to guide them. Add Colima as a supported Docker runtime, document buildx installation, and ensure setup-local installs buildx automatically. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent ed723f4 commit 1adc774

File tree

3 files changed

+69
-5
lines changed

3 files changed

+69
-5
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
### Supported Systems
2929

3030
- **Linux x86_64** (fully supported)
31+
- **macOS** (local development supported via Docker Desktop or Colima)
3132
- **ARM64** (partial support for upstream Google OSS-Fuzz projects)
3233

3334
### Required System Packages
@@ -75,6 +76,14 @@ This script will install all dependencies, configure the environment, and guide
7576

7677
**Note:** If you prefer manual setup, see the [Manual Setup Guide](guides/MANUAL_SETUP.md).
7778

79+
1. Ensure Docker is running before deploying:
80+
81+
```bash
82+
# Docker Desktop: start the application
83+
# Colima (macOS/Linux alternative):
84+
colima start --cpu 6 --memory 10 --disk 80
85+
```
86+
7887
1. Start Buttercup locally
7988

8089
```bash

deployment/README.md

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,24 +32,42 @@ This section covers deploying the CRS locally using minikube on macOS or Linux.
3232

3333
### Local Prerequisites
3434

35-
- **Docker Desktop** (macOS/Windows) or Docker Engine (Linux)
35+
- **Docker Desktop** (macOS/Windows), **Colima** (macOS/Linux), or Docker Engine (Linux)
36+
- **docker-buildx**: Required for building images (`brew install docker-buildx` on macOS)
3637
- **minikube**: `brew install minikube` (macOS) or see [minikube install docs](https://minikube.sigs.k8s.io/docs/start/)
3738
- **helm**: `brew install helm` (macOS)
3839
- **kubectl**: `brew install kubectl` (macOS)
3940

40-
### Docker Desktop Resource Configuration
41+
### Docker Resource Configuration
4142

42-
Docker Desktop has default resource limits that are typically too low for the full CRS deployment.
43+
The Docker runtime must have enough resources allocated for the full CRS deployment.
4344

44-
**To configure Docker Desktop resources (macOS):**
45+
**Docker Desktop (macOS/Windows):**
4546
1. Open Docker Desktop > Settings > Resources
4647
2. Allocate at least:
4748
- CPUs: 4-6 (depending on your machine)
4849
- Memory: 8-12 GB (10GB recommended for full deployment)
4950
- Disk: 80+ GB
5051
3. Click "Apply & Restart"
5152

52-
**Important**: Minikube cannot use more resources than Docker Desktop allocates. If `env.template` specifies `MINIKUBE_CPU=6` and `MINIKUBE_MEMORY_GB=10`, but Docker Desktop only has 4 CPUs and 8GB RAM, minikube will fail to start or pods will remain Pending.
53+
**Colima (macOS/Linux):**
54+
```bash
55+
colima start --cpu 6 --memory 10 --disk 80
56+
```
57+
58+
After starting Colima, ensure the buildx plugin is linked:
59+
```bash
60+
brew install docker-buildx
61+
```
62+
63+
`docker-buildx` is a Docker plugin. For Docker to find the plugin, add "cliPluginsExtraDirs" to ~/.docker/config.json:
64+
```json
65+
"cliPluginsExtraDirs": [
66+
"/opt/homebrew/lib/docker/cli-plugins"
67+
]
68+
```
69+
70+
**Important**: Minikube cannot use more resources than the Docker runtime allocates. If `env.template` specifies `MINIKUBE_CPU=6` and `MINIKUBE_MEMORY_GB=10`, but Docker only has 4 CPUs and 8GB RAM, minikube will fail to start or pods will remain Pending.
5371

5472
### Quick Start
5573

scripts/common.sh

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -807,13 +807,50 @@ check_brew() {
807807
fi
808808
}
809809

810+
# Register Homebrew cli-plugins dir so Docker discovers plugins like
811+
# buildx. Prefers patching ~/.docker/config.json via jq; falls back
812+
# to a per-plugin symlink when jq is not installed.
813+
ensure_docker_cli_plugins_dir() {
814+
local plugins_dir="/opt/homebrew/lib/docker/cli-plugins"
815+
local config_file="$HOME/.docker/config.json"
816+
817+
if command_exists jq; then
818+
mkdir -p "$(dirname "$config_file")"
819+
if [ ! -f "$config_file" ]; then
820+
echo '{}' > "$config_file"
821+
fi
822+
# Idempotent: appends only if the path isn't already listed
823+
local tmp="${config_file}.tmp"
824+
jq --arg d "$plugins_dir" \
825+
'.cliPluginsExtraDirs = ((.cliPluginsExtraDirs // []) | if index($d) then . else . + [$d] end)' \
826+
"$config_file" > "$tmp" && mv "$tmp" "$config_file"
827+
else
828+
print_warning "jq not found — falling back to symlink for docker-buildx"
829+
mkdir -p ~/.docker/cli-plugins
830+
ln -sfn "$(brew --prefix docker-buildx)/lib/docker/cli-plugins/docker-buildx" \
831+
~/.docker/cli-plugins/docker-buildx
832+
fi
833+
}
834+
810835
install_docker_mac() {
811836
if command_exists docker; then
812837
print_success "Docker is already installed"
813838
else
814839
print_status "Installing Docker..."
815840
brew install --cask docker
816841
fi
842+
843+
# Ensure docker-buildx is available (bundled with Docker Desktop,
844+
# but must be installed separately for Colima users)
845+
if ! docker buildx version >/dev/null 2>&1; then
846+
print_status "Installing docker-buildx plugin..."
847+
brew install docker-buildx
848+
# Register Homebrew cli-plugins dir so Docker discovers buildx
849+
ensure_docker_cli_plugins_dir
850+
print_success "docker-buildx installed"
851+
else
852+
print_success "docker-buildx is available"
853+
fi
817854
}
818855

819856
install_uv_mac() {

0 commit comments

Comments
 (0)