# Docker + Colima Autostart Setup (macOS) _Последнее обновление: 2026-06-24_ ## Текущие параметры Colima ``` colima start --cpu 8 --memory 24 --disk 100 ``` - virtiofs mount type - Build cache volume `buildx_buildkit_arm64builder0_state` занимает до 8+ GB и не чистится автоматически. См. [[tech/docker-mac-disk-issues]]. ## 1. Install dependencies ``` bash brew install docker docker-compose colima ``` ------------------------------------------------------------------------ ## 2. Start Colima manually (first run) ``` bash colima start --cpu 6 --memory 12 --disk 100 ``` ------------------------------------------------------------------------ ## 3. Stop Colima ``` bash colima stop ``` ------------------------------------------------------------------------ ## 4. Check status ``` bash colima status colima list ``` ------------------------------------------------------------------------ ## 5. Create LaunchAgent (auto-start Colima) File: `~/Library/LaunchAgents/com.colima.start.plist` ``` xml Label com.colima.start ProgramArguments /bin/bash -c export PATH=/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin && colima start RunAtLoad StandardOutPath /tmp/colima.out StandardErrorPath /tmp/colima.err ``` ------------------------------------------------------------------------ ## 6. Load LaunchAgent ``` bash launchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/com.colima.start.plist ``` ------------------------------------------------------------------------ ## 7. Unload LaunchAgent ``` bash launchctl bootout gui/$(id -u) ~/Library/LaunchAgents/com.colima.start.plist ``` ------------------------------------------------------------------------ ## 8. Restart / trigger manually ``` bash launchctl kickstart -k gui/$(id -u)/com.colima.start ``` ------------------------------------------------------------------------ ## 9. Check logs ``` bash cat /tmp/colima.out cat /tmp/colima.err ``` ------------------------------------------------------------------------ ## 10. Docker usage Start containers: ``` bash docker compose up -d ``` Check running containers: ``` bash docker ps ``` ------------------------------------------------------------------------ ## Behavior - Colima auto-starts on login via LaunchAgent - Docker auto-restores containers with `restart: unless-stopped` - No need to run `docker compose up` on every reboot