#!/bin/bash # Docker Installation Script for Archipelago # This script installs Docker Desktop on macOS set -e echo "============================================" echo "Docker Desktop Installation" echo "============================================" echo "" # Colors GREEN='\033[0;32m' YELLOW='\033[1;33m' RED='\033[0;31m' NC='\033[0m' # Check if Homebrew is installed echo "Checking Homebrew..." if ! command -v brew &> /dev/null; then echo -e "${YELLOW}Homebrew not found. Installing Homebrew first...${NC}" /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" # Add Homebrew to PATH for Apple Silicon if [[ $(uname -m) == 'arm64' ]]; then echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile eval "$(/opt/homebrew/bin/brew shellenv)" fi echo -e "${GREEN}✓ Homebrew installed${NC}" else echo -e "${GREEN}✓ Homebrew already installed${NC}" fi echo "" # Check if Docker is already installed echo "Checking Docker..." if command -v docker &> /dev/null; then echo -e "${GREEN}✓ Docker already installed ($(docker --version))${NC}" echo "" echo "Docker is already available. Checking if it's running..." if docker ps &> /dev/null; then echo -e "${GREEN}✓ Docker is running${NC}" else echo -e "${YELLOW}⚠ Docker is installed but not running${NC}" echo "Please start Docker Desktop from Applications" fi exit 0 fi echo -e "${YELLOW}Installing Docker Desktop...${NC}" echo "This may take a few minutes..." echo "" # Install Docker using Homebrew Cask brew install --cask docker echo "" echo -e "${GREEN}✓ Docker Desktop installed${NC}" echo "" # Instructions to start Docker echo "============================================" echo "Next Steps" echo "============================================" echo "" echo "1. Open Docker Desktop from Applications:" echo " - Open Finder > Applications > Docker" echo " - Or press Cmd+Space and type 'Docker'" echo "" echo "2. Docker Desktop will start and you'll see a whale icon in your menu bar" echo "" echo "3. Wait for Docker to finish starting (the whale icon will stop animating)" echo "" echo "4. Verify Docker is running:" echo " docker --version" echo " docker ps" echo "" echo "5. Then you can continue with Archipelago setup" echo "" echo "============================================" echo "Alternative: Using Podman (Recommended)" echo "============================================" echo "" echo "Archipelago is designed to work with Podman, which is:" echo " - Lighter weight than Docker" echo " - Rootless (more secure)" echo " - Drop-in replacement for Docker" echo "" echo "To install Podman instead, run:" echo " ./INSTALL.sh" echo "" echo "This will install all dependencies including Podman." echo ""