Install Docker on macOS Without Docker Desktop
安装Docker
| 安装 Homebrew(如果未安装)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- 安装 Docker CLI
brew install docker - 使用轻量级 VM 设置 Linux 环境
brew install colima
启动 Colima 以启动 Linux VM 并运行 Docker 守护程序:
colima start
自定义配置(示例:分配 6 核 CPU/12GB 内存/100GB 磁盘)
colima start --cpu 6 --memory 12 --disk 100
运行 Colima 后,Docker CLI 可以与 Linux 环境中的 Docker 守护程序通信 - 运行 Docker 命令
docker pull hello-world
常用命令
启动 Colima colima start
停止 Colima colima stop
删除虚拟机 colima delete
查看状态 colima status
重启 colima restart


浙公网安备 33010602011771号