From 3aff92bd410a61a785d99cd557490408d605b528 Mon Sep 17 00:00:00 2001 From: docker-claude Date: Thu, 16 Apr 2026 10:16:23 +0200 Subject: [PATCH] chore: replace Docker Desktop references with open-source alternatives Docker Desktop requires a commercial licence for business use. Replace all references with free alternatives: - macOS: Rancher Desktop (GUI) or Colima (CLI) - Linux: Docker Engine CE (no Desktop needed at all) - Windows: Rancher Desktop or WSL2 + Docker Engine setup.sh detects the OS and shows platform-specific install instructions. claude.sh defers to setup.sh for install hints to avoid duplication. README documents all options including a WSL2 setup walkthrough. Co-Authored-By: Claude Sonnet 4.6 --- README.md | 30 +++++++++++++++++++++++++++--- claude.sh | 9 +++------ setup.sh | 47 ++++++++++++++++++++++++++++++++++++++++++----- 3 files changed, 72 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index be25819..7eaef5d 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,17 @@ Runs [Claude Code](https://claude.ai/code) inside an isolated Docker environment ## Quick Start -**1. Install Docker Desktop** +**1. Install a Docker runtime** -Download and install [Docker Desktop](https://www.docker.com/products/docker-desktop/) for your platform. It's free and includes everything needed — no extra tools required. +Pick the free, open-source option for your platform: + +| Platform | Recommended | Alternative | +|---|---|---| +| macOS | [Rancher Desktop](https://rancherdesktop.io/) (GUI) | [Colima](https://github.com/abiosoft/colima) (CLI): `brew install colima docker docker-compose && colima start` | +| Linux | Docker Engine: `curl -fsSL https://get.docker.com \| sh` | [Rancher Desktop](https://rancherdesktop.io/) | +| Windows | [Rancher Desktop](https://rancherdesktop.io/) (GUI) | WSL2 + Docker Engine (see below) | + +> **Note:** Docker Desktop is not listed — it requires a commercial licence for business use. **2. Download this repo** @@ -67,7 +75,13 @@ Setup will ask how you want to authenticate (API key, subscription token, or bro ## Prerequisites -- [Docker Desktop](https://www.docker.com/products/docker-desktop/) (includes Docker Engine and Compose) +A Docker runtime with Compose support. Choose a free, open-source option: + +- **macOS:** [Rancher Desktop](https://rancherdesktop.io/) or [Colima](https://github.com/abiosoft/colima) +- **Linux:** [Docker Engine CE](https://docs.docker.com/engine/install/) (`curl -fsSL https://get.docker.com | sh`) +- **Windows:** [Rancher Desktop](https://rancherdesktop.io/) or WSL2 + Docker Engine + +> Docker Desktop is not recommended — it requires a commercial licence for business use. ## Authentication @@ -116,6 +130,16 @@ cd ~/myproject ./claude.sh shell # Debug bash shell in the Claude container ``` +### Windows: WSL2 + Docker Engine (alternative to Rancher Desktop) + +1. Install [WSL2](https://learn.microsoft.com/en-us/windows/wsl/install): `wsl --install` in PowerShell +2. Open the Ubuntu terminal and run: + ```bash + curl -fsSL https://get.docker.com | sh + sudo usermod -aG docker $USER + ``` +3. Log out and back in, then run `launch.bat` as usual. + ### Building locally ```bash diff --git a/claude.sh b/claude.sh index 7a7f3a0..21bede4 100755 --- a/claude.sh +++ b/claude.sh @@ -17,18 +17,15 @@ error() { echo -e "${RED}[-]${NC} $*" >&2; } # ─── Helpers ────────────────────────────────────────────────────────────────── check_deps() { if ! command -v docker &>/dev/null; then - error "Docker is not installed." - error " → Download Docker Desktop (free): https://www.docker.com/products/docker-desktop/" + error "Docker is not installed. Run ./setup.sh for install instructions." exit 1 fi if ! docker info &>/dev/null 2>&1; then - error "Docker is not running." - error " → Open Docker Desktop and wait for it to finish starting, then try again." + error "Docker is not running. Start your Docker runtime, then try again." exit 1 fi if ! docker compose version &>/dev/null 2>&1; then - error "Docker Compose is not available." - error " → Download Docker Desktop (includes Compose): https://www.docker.com/products/docker-desktop/" + error "Docker Compose is not available. Run ./setup.sh for install instructions." exit 1 fi } diff --git a/setup.sh b/setup.sh index 3f9d380..da6c37a 100755 --- a/setup.sh +++ b/setup.sh @@ -11,27 +11,64 @@ warn() { echo -e "${YELLOW}[!]${NC} $*"; } error() { echo -e "${RED}[✗]${NC} $*" >&2; } step() { echo -e "\n${BOLD}$*${NC}"; } +# ─── Platform-specific install hints ───────────────────────────────────────── +docker_install_hint() { + case "$(uname -s)" in + Darwin) + echo " Install one of the following (both are free and open source):" + echo " • Rancher Desktop (GUI, easiest): https://rancherdesktop.io/" + echo " • Colima (CLI): brew install colima docker docker-compose && colima start" + ;; + Linux) + echo " Install Docker Engine (free, no licensing restrictions):" + echo " curl -fsSL https://get.docker.com | sh" + echo " sudo usermod -aG docker \$USER # then log out and back in" + ;; + *) + # Windows / Git Bash / WSL + echo " Install one of the following (both are free and open source):" + echo " • Rancher Desktop (GUI, easiest): https://rancherdesktop.io/" + echo " • WSL2 + Docker Engine: install Ubuntu from the Microsoft Store," + echo " then run: curl -fsSL https://get.docker.com | sh" + ;; + esac +} + +docker_not_running_hint() { + case "$(uname -s)" in + Darwin|MINGW*|MSYS*|CYGWIN*) + echo " → Open Rancher Desktop (or whichever Docker runtime you installed)" + echo " and wait for it to finish starting, then run this setup again." + ;; + Linux) + echo " → Start the Docker daemon: sudo systemctl start docker" + ;; + *) + echo " → Start your Docker runtime and try again." + ;; + esac +} + # ─── Check Docker ───────────────────────────────────────────────────────────── check_docker() { step "Checking Docker..." if ! command -v docker &>/dev/null; then error "Docker is not installed." - echo " → Download Docker Desktop (free): https://www.docker.com/products/docker-desktop/" - echo " It includes everything you need — no extra tools required." + docker_install_hint exit 1 fi if ! docker info &>/dev/null 2>&1; then error "Docker is installed but not running." - echo " → Open Docker Desktop and wait for the whale icon to stop animating," - echo " then run this setup again." + docker_not_running_hint exit 1 fi if ! docker compose version &>/dev/null 2>&1; then error "Docker Compose is not available." - echo " → Download Docker Desktop (includes Compose): https://www.docker.com/products/docker-desktop/" + echo " Docker Compose is included with Rancher Desktop and Docker Engine." + docker_install_hint exit 1 fi