[2026-05-12] taiga sync: family/.DS_Store family/_index.md family/how-to/htpc-access.md family/how-to/htpc-gaming-plans.md family/how-to/htpc-magic4pc.md family/how-to/htpc-migration-plan.md family/how-to/htpc-system.md family/how-to/htpc-webos-luna.md family/how-to/htpc.md family/how-to/magic4pc-webos.md
This commit is contained in:
Executable
+121
@@ -0,0 +1,121 @@
|
||||
# Docker + Colima Autostart Setup (macOS)
|
||||
|
||||
## 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
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>Label</key>
|
||||
<string>com.colima.start</string>
|
||||
|
||||
<key>ProgramArguments</key>
|
||||
<array>
|
||||
<string>/bin/bash</string>
|
||||
<string>-c</string>
|
||||
<string>export PATH=/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin && colima start</string>
|
||||
</array>
|
||||
|
||||
<key>RunAtLoad</key>
|
||||
<true/>
|
||||
|
||||
<key>StandardOutPath</key>
|
||||
<string>/tmp/colima.out</string>
|
||||
|
||||
<key>StandardErrorPath</key>
|
||||
<string>/tmp/colima.err</string>
|
||||
</dict>
|
||||
</plist>
|
||||
```
|
||||
|
||||
------------------------------------------------------------------------
|
||||
|
||||
## 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
|
||||
Reference in New Issue
Block a user